[next-auth][error][NO_SECRET]
Unanswered
Dwarf Crocodile posted this in #help-forum
Dwarf CrocodileOP
I have secret in my auth options but its says no secret. How can i fix that?
import NextAuth, { AuthOptions, SessionStrategy } from "next-auth";
import CredentialsProvider from "next-auth/providers/credentials";
const authOptions: AuthOptions = {
secret: "i have secret in here",
providers: [
CredentialsProvider({
name: "credentials",
credentials: {},
async authorize(credentials, req) {
return null;
}
})
],
session: {
strategy: "jwt" as SessionStrategy
},
pages: {
signIn: "/login"
}
};
const handler = NextAuth(authOptions);
export { handler as GET, handler as POST }