fix: GitHub OAuth provider에 issuer 설정 추가 (RFC 9207 대응) - #101
Merged
Conversation
GitHub이 2026-04부터 OAuth 콜백 응답에 RFC 9207 iss 파라미터를 포함시키기 시작했다. next-auth(openid-client)는 iss가 오면 provider의 issuer 설정값과 대조하는데, 이 값이 없으면 'issuer must be configured on the issuer' 에러(OAuthCallbackError)로 로그인 콜백 자체가 실패한다. GithubProvider에 issuer: 'https://github.com/login/oauth'를 명시해 해결. 로컬에서 재현 및 수정 확인함. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
배경
로컬에서 GitHub 로그인이
error=OAuthCallback으로 실패하는 문제를 조사하며 발견했다. #99/#100과는 무관한, GitHub 쪽에서 최근 생긴 외부 브레이킹 체인지다.문제
GitHub이 2026-04부터 OAuth 콜백 응답에 RFC 9207
iss파라미터를 포함시키기 시작했다. next-auth가 내부에서 쓰는openid-client는 콜백 응답에iss가 있으면 provider에 설정된issuer값과 대조하는데, 우리GithubProvider설정엔issuer가 없어서 다음 에러로 로그인 콜백 자체가 실패한다.next-auth v4로 GitHub OAuth를 쓰는 프로젝트 전반에 영향을 준 이슈다 (참고 이슈, 커뮤니티 디스커션).
수정
GithubProvider({ clientId: process.env.GITHUB_ID!, clientSecret: process.env.GITHUB_SECRET!, + issuer: 'https://github.com/login/oauth', }),로컬에서 재현 후 이 설정 추가로 로그인 정상 동작 확인함.
🤖 Generated with Claude Code