You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the function signIn("github") to redirect to configured GitHub OAuth does not work. It throws CLIENT_FETCH_ERROR then reloads the current page.
However, signIn() works and redirects me to NextAuth's default login page (``http://localhost:3000/api/auth/signin?callbackUrl=http%3A%2F%2Flocalhost%3A3000%2Flogin) with my provider in it, and the functionality works there. Also, passing anything to signIn other than my provider (github in this example) works as well and has the same behavior as passing nothing.
To redirect me directly to github authentication page, not to the default NextAuth signIn page.
The text was updated successfully, but these errors were encountered:
ahmed-fawzy99
added
bug
Something isn't working
triage
Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.
labels
Apr 2, 2025
Environment
Reproduction URL
https://github.com/ahmed-fawzy99/next-auth-fetch-error-example
Describe the issue
Using the function signIn("github") to redirect to configured GitHub OAuth does not work. It throws CLIENT_FETCH_ERROR then reloads the current page.
However, signIn() works and redirects me to NextAuth's default login page (``http://localhost:3000/api/auth/signin?callbackUrl=http%3A%2F%2Flocalhost%3A3000%2Flogin) with my provider in it, and the functionality works there. Also, passing anything to signIn other than my provider (github in this example) works as well and has the same behavior as passing nothing.
I'm on Next 15.2.4, NextAuth 4.24.11, Node 22.11
This is my configuration:
.env.local:
layout:
The client component that calls signIn:
How to reproduce
Explained in the issue description.
Expected behavior
To redirect me directly to github authentication page, not to the default NextAuth signIn page.
The text was updated successfully, but these errors were encountered: