Development
1/1/23
Here is my example authOptions.
export const authOptions: NextAuthOptions = {
adapter: DrizzleAdapter(db) as Adapter,
callbacks: {
session: ({ session, user }) => {
session.user.id = user.id;
return session;
},
signIn: async (params) => {
},
},
providers: [
Email({
server: {
host: "smtp.gmail.com",
port: 465,
secure: true,
auth: {
user: env.GMAIL_USER,
pass: env.GMAIL_PASS,
},
},
from: "Fastzayn",
}),
GoogleProvider({
clientId: env.GOOGLE_CLIENT_ID,
clientSecret: env.GOOGLE_CLIENT_SECRET,
}),
AppleProvider({
clientId: env.APPLE_CLIENT_ID,
clientSecret: env.APPLE_CLIENT_SECRET,
}),
],
};
Here is my example authOptions.
export const authOptions: NextAuthOptions = {
adapter: DrizzleAdapter(db) as Adapter,
callbacks: {
session: ({ session, user }) => {
session.user.id = user.id;
return session;
},
signIn: async (params) => {
},
},
providers: [
Email({
server: {
host: "smtp.gmail.com",
port: 465,
secure: true,
auth: {
user: env.GMAIL_USER,
pass: env.GMAIL_PASS,
},
},
from: "Fastzayn",
}),
GoogleProvider({
clientId: env.GOOGLE_CLIENT_ID,
clientSecret: env.GOOGLE_CLIENT_SECRET,
}),
AppleProvider({
clientId: env.APPLE_CLIENT_ID,
clientSecret: env.APPLE_CLIENT_SECRET,
}),
],
};