Skip to content

fix: GitHub OAuth provider에 issuer 설정 추가 (RFC 9207 대응) - #101

Merged
ShipFriend0516 merged 1 commit into
masterfrom
fix/github-oauth-rfc9207-issuer
Sep 1, 2026
Merged

fix: GitHub OAuth provider에 issuer 설정 추가 (RFC 9207 대응)#101
ShipFriend0516 merged 1 commit into
masterfrom
fix/github-oauth-rfc9207-issuer

Conversation

@ShipFriend0516

Copy link
Copy Markdown
Owner

배경

로컬에서 GitHub 로그인이 error=OAuthCallback으로 실패하는 문제를 조사하며 발견했다. #99/#100과는 무관한, GitHub 쪽에서 최근 생긴 외부 브레이킹 체인지다.

문제

GitHub이 2026-04부터 OAuth 콜백 응답에 RFC 9207 iss 파라미터를 포함시키기 시작했다. next-auth가 내부에서 쓰는 openid-client는 콜백 응답에 iss가 있으면 provider에 설정된 issuer 값과 대조하는데, 우리 GithubProvider 설정엔 issuer가 없어서 다음 에러로 로그인 콜백 자체가 실패한다.

[next-auth][error][OAUTH_CALLBACK_ERROR] issuer must be configured on the 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

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>
@vercel

vercel Bot commented Sep 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
blog Ready Ready Preview Sep 1, 2026 3:12pm UTC

Request Review

@ShipFriend0516
ShipFriend0516 merged commit b295630 into master Sep 1, 2026
3 checks passed
@ShipFriend0516
ShipFriend0516 deleted the fix/github-oauth-rfc9207-issuer branch September 1, 2026 15:12
@ShipFriend0516
ShipFriend0516 restored the fix/github-oauth-rfc9207-issuer branch September 1, 2026 15:13
@ShipFriend0516
ShipFriend0516 deleted the fix/github-oauth-rfc9207-issuer branch September 1, 2026 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant