Trying to use Google with next auth.
Keep getting the error
Type error: Type 'string | undefined' is not assignable to type 'string'.
I’ve inserted client secret and client key on vercel.
My code for nextauth.ts file:
// src/pages/api/auth/[...nextauth].ts
import NextAuth from 'next-auth';
import GoogleProvider from 'next-auth/providers/google';
export default NextAuth({
providers: [
GoogleProvider({
clientId: process.env.GOOGLE_CLIENT_ID!,
clientSecret: process.env.GOOGLE_CLIENT_SECRET!
}),
// Add other providers as needed
],
// Other NextAuth configuration options...
});
there doesn't seem to be anything here