Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use custom fetch if defined in GitHub userInfo #12668

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nikita-lepikhin
Copy link

@nikita-lepikhin nikita-lepikhin commented Feb 18, 2025

This PR fixes an issue in the GitHub provider where the function responsible for loading user info does not use the customFetch function when it is defined.

According to the official documentation Supporting Corporate Proxies, a custom fetch function can be defined to forward all authentication-related requests to a proxy. However, in this case, the request that retrieves user info was not routed through the proxy, causing the OAuth login flow to fail (if the environment where the app is deployed does not allow any requests to bypass the proxy).

Copy link

vercel bot commented Feb 18, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
auth-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 18, 2025 6:50pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
next-auth-docs ⬜️ Ignored (Inspect) Visit Preview Feb 18, 2025 6:50pm

Copy link

vercel bot commented Feb 18, 2025

@nikita-lepikhin is attempting to deploy a commit to the authjs Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Refers to `@auth/core` providers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant