forked from wasp-lang/wasp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updates Mage to use 0.13.0 (wasp-lang#1906)
- Loading branch information
Showing
4 changed files
with
8 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
app waspAi { | ||
wasp: { | ||
version: "^0.12.2" | ||
version: "^0.13.0" | ||
}, | ||
title: "MAGE - GPT Web App Generator ✨", | ||
head: [ | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,25 @@ | ||
import { defineUserSignupFields } from 'wasp/server/auth' | ||
|
||
export const googleUserSignupFields = defineUserSignupFields({ | ||
email: async (data) => (data.profile as any)?.emails?.[0]?.value, | ||
username: async (data) => (data.profile as any)?.emails?.[0]?.value, | ||
email: async (data: any) => data.profile.email, | ||
username: async (data: any) => data.profile?.email, | ||
}); | ||
|
||
export const getGoogleAuthConfig = () => { | ||
return { | ||
clientID: process.env.GOOGLE_CLIENT_ID, | ||
clientSecret: process.env.GOOGLE_CLIENT_SECRET, | ||
scope: ["profile", "email"], | ||
scopes: ["profile", "email"], | ||
}; | ||
}; | ||
|
||
// NOTE: if we don't want to access users' emails, we can use scope ["user:read"] | ||
// instead of ["user"] and access data.profile.username instead | ||
export const gitHubUserSignupFields = defineUserSignupFields({ | ||
email: async (data) => (data.profile as any)?.emails?.[0]?.value, | ||
username: async (data) => (data.profile as any)?.username, | ||
email: async (data: any) => data.profile.email, | ||
username: async (data: any) => data.profile.login, | ||
}) | ||
|
||
export function getGitHubAuthConfig() { | ||
return { | ||
clientID: process.env.GITHUB_CLIENT_ID, // look up from env or elsewhere | ||
clientSecret: process.env.GITHUB_CLIENT_SECRET, // look up from env or elsewhere | ||
scope: ["user"], | ||
scopes: ["user"], | ||
}; | ||
} |