-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathauth.config.ts
More file actions
33 lines (31 loc) · 981 Bytes
/
Copy pathauth.config.ts
File metadata and controls
33 lines (31 loc) · 981 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import GitHub from "next-auth/providers/github"
import Google from "next-auth/providers/google"
import type { NextAuthConfig } from "next-auth"
const githubClientId =
process.env.AUTH_GITHUB_ID ?? process.env.GITHUB_ID;
const githubClientSecret =
process.env.AUTH_GITHUB_SECRET ?? process.env.GITHUB_SECRET;
const googleClientId =
process.env.AUTH_GOOGLE_ID ?? process.env.GOOGLE_CLIENT_ID;
const googleClientSecret =
process.env.AUTH_GOOGLE_SECRET ?? process.env.GOOGLE_CLIENT_SECRET;
export default{
pages: {
signIn: "/auth/sign-in",
},
providers:[
GitHub({
clientId: githubClientId,
clientSecret: githubClientSecret,
authorization: {
params: {
scope: "read:user repo",
},
},
}),
Google({
clientId: googleClientId,
clientSecret: googleClientSecret,
})
]
} satisfies NextAuthConfig