NextAuth callback handler returns null
Unanswered
Masai Lion posted this in #help-forum
Masai LionOP
api/auth/[...nextauth]/route.js
@/lib/auth.js
Login Page
import { handlers } from "@/lib/auth"
export const { GET, POST } = handlers@/lib/auth.js
import NextAuth from "next-auth";
import Google from "next-auth/providers/google";
export const { signIn, signOut, auth, handlers } = NextAuth({
providers: [Google],
});Login Page
import { signIn } from "@/lib/auth";
export default function() {
return (
<form
action={async () => {
"use server";
await signIn("google");
}}
>
<button type="submit">Signin with Google</button>
</form>
);
}