Next.js Discord

Discord Forum

Middleware.js redirect straight to provider

Unanswered
American black bear posted this in #help-forum
Open in Discord
American black bearOP
export { default } from "next-auth/middleware"

export const config = { matcher: ["/message"] }


Is there any way I can redirect straight to the Google authentication page instead of the NextAuth page where you choose your provider?

1 Reply

Sloth bear
If you use signIn() from next-auth/react in a client component, you can do signIn(“google”)