next-auth Google doesnt provide session after Login
Answered
Highlander posted this in #help-forum
HighlanderOP
Basically what the title says.
import NextAuth from "next-auth";
import type { NextAuthOptions } from "next-auth";
import GoogleProvider from "next-auth/providers/google";
export const authOptions: NextAuthOptions = {
secret: process.env.NEXTAUTH_SECRET,
providers: [
GoogleProvider({
clientId: process.env.GOOGLE_ID as string,
clientSecret: process.env.GOOGLE_SECRET as string,
}),
],
};
const handler = NextAuth(authOptions);
export { handler as GET, handler as POST };Answered by Highlander
Already fixed the issues, forgot what the problem was tho. The Callbacks arent needed.
3 Replies
Great black wasp
There no session or jwt callback how you gonna get the session
@Great black wasp There no session or jwt callback how you gonna get the session
HighlanderOP
Already fixed the issues, forgot what the problem was tho. The Callbacks arent needed.
Answer