Next-auth redirects me on auth/error on signIn()

I'm using app router in nextjs, when I call signIn("google") in localhost, next-auth works pretty well but on production, it redirects me instantly on api/auth/error route this is my app/api/auth/[...next-auth]/route.ts look like
import { env } from "@/env";
import NextAuth, { type NextAuthOptions } from "next-auth";
import GoogleProvider from "next-auth/providers/google";

export const authOptions: NextAuthOptions = {
providers: [
GoogleProvider({
clientId: env.GOOGLE_CLIENT_ID,
clientSecret: env.GOOGLE_SECRET,
}),

],
session: { strategy: "jwt" }
};

const handler = NextAuth(authOptions);
export { handler as GET, handler as POST };
import { env } from "@/env";
import NextAuth, { type NextAuthOptions } from "next-auth";
import GoogleProvider from "next-auth/providers/google";

export const authOptions: NextAuthOptions = {
providers: [
GoogleProvider({
clientId: env.GOOGLE_CLIENT_ID,
clientSecret: env.GOOGLE_SECRET,
}),

],
session: { strategy: "jwt" }
};

const handler = NextAuth(authOptions);
export { handler as GET, handler as POST };
what can be problem? in production I think, env are all good
8 Replies
AllesCoolAllesBestens
Did you update the NEXTAUTH_URL environment variable?
yaviscoke
yaviscokeOP13mo ago
https://admin.audiostream.space/ you can check it by your self
yaviscoke
yaviscokeOP13mo ago
No description
yaviscoke
yaviscokeOP13mo ago
here is
AllesCoolAllesBestens
I don't know then, hope someone else can help you
yaviscoke
yaviscokeOP13mo ago
No description
yaviscoke
yaviscokeOP13mo ago
No description
yaviscoke
yaviscokeOP13mo ago
even i've these in urls
Want results from more Discord servers?
Add your server