-
Notifications
You must be signed in to change notification settings - Fork 0
/
auth.config.js
42 lines (40 loc) · 1.24 KB
/
auth.config.js
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
34
35
36
37
38
39
40
41
42
import GitHub from "next-auth/providers/github";
import Google from "next-auth/providers/google";
import Credentials from "next-auth/providers/credentials";
export default {
pages: {
signIn: "/signin",
},
providers: [
GitHub({
clientId: process.env.GITHUB_ID,
clientSecret: process.env.GITHUB_SECRET,
}),
Google({
clientId: process.env.GOOGLE_ID,
clientSecret: process.env.GOOGLE_SECRET,
}),
Credentials({
async authorize(credentials) {
console.log(credentials);
// const validatedFields = LoginSchema.safeParse(credentials);
// console.log(validatedFields, "validatedFields");
// console.log(credentials);
// if(validatedFields.success) {
// const res = await fetch("http://localhost:3000/api/logi", {
// method: "POST",
// body: JSON.stringify({
// username: validatedFields.data.username,
// password: validatedFields.data.password,
// }),
// headers: {
// "Content-Type": "application/json",
// },
// });
// console.log(res, "RES!");
// }
return null;
},
}),
],
};