
OAuthアプリに複数リダイレクトURIとトークンリフレッシュ機能が追加Multiple redirect URIs and token refresh for OAuth apps
匿名の公開いいねです。記事の保存・お気に入りではなく、Featured、Top 3、重要度、掲載順位には影響しません。仕組みとプライバシーAnonymous public likes are reactions, not saved articles or bookmarks. They do not affect Featured, Top 3, importance, or listing order.How it works and privacy
- GitHubがOAuthアプリとGitHub Appプラットフォームを更新し、有効期限付きアクセストークン・リフレッシュトークンのオプトインや複数リダイレクトURIのサポートを追加した。
- これによりより安全なアプリ開発が可能になる。
GitHub has updated the OAuth app and GitHub App platforms to support expiring access tokens with refresh tokens and multiple redirect URIs, giving developers stronger security options for app authentication flows.
要約と収集メタデータをもとに生成した AI 解説本文です。元記事全文の転載・翻訳ではありません。This AI explainer is generated from the summaries and collected metadata, not from a reproduction or translation of the full source article.
GitHubは、OAuthアプリおよびGitHub Appのプラットフォームに複数の更新を加え、より安全なアプリ開発を支援する新機能を公開した。開発者はOAuthアプリにおいて、有効期限付きのアクセストークンとリフレッシュトークンの利用をオプトインで選択できるようになり、あわせて複数のリダイレクトURIを登録できるようになった。
まず注目されるのが、有効期限付きアクセストークンとリフレッシュトークンのサポートだ。従来のOAuthアクセストークンは無期限で有効なものが一般的で、万一トークンが漏洩した場合に第三者へ長期間アクセスを許してしまうリスクがあった。有効期限を設けることで、トークンが流出しても被害範囲を時間的に限定でき、リフレッシュトークンを用いれば利用者に再ログインを強いることなく新しいアクセストークンを取得できる。これはOAuth 2.0で広く採用される仕組みで、短命なトークンを前提とするセキュリティ設計の潮流に沿った変更と言える。
複数リダイレクトURIへの対応も、実務上の利便性と安全性の双方に関わる。リダイレクトURIは認証後にユーザーを戻す先を指定するもので、登録済みの値と厳密に一致することが求められる。単一のURIしか登録できない場合、開発環境と本番環境で別々のアプリを用意するなどの工夫が必要になりがちだった。複数のURIを登録できれば、こうした運用を単純化しつつ、任意のURLへのリダイレクトを許す危険な回避策を避けやすくなる。
GitHubがOAuthアプリとGitHub Appプラットフォームを更新し、有効期限付きアクセストークン・リフレッシュトークンのオプトインや複数リダイレクトURIのサポートを追加した。
GitHubはOAuthアプリと、よりきめ細かい権限管理が可能なGitHub Appという二つの仕組みを提供しており、今回の更新は両プラットフォームにまたがる。近年はクラウドサービス全般で、長期間有効な認証情報を避け、短命なトークンや自動失効を組み合わせる設計が重視されている。今回の機能追加はオプトイン方式とされ、既存アプリへの影響を抑えつつ、開発者が段階的により堅牢な認証フローへ移行できるようにする狙いがあると見られる。
GitHub has rolled out a set of updates to its OAuth app and GitHub App platforms aimed at strengthening how third-party applications authenticate against its APIs. The headline changes let OAuth apps opt in to expiring access tokens paired with refresh tokens, and add support for registering multiple redirect URIs per application. For anyone building integrations on top of GitHub, these are practical improvements to the security posture of common authentication flows.
The most security-relevant addition is optional token expiration. Historically, access tokens issued through GitHub's OAuth app flow did not expire on their own, which meant that a token leaked through a log file, a misconfigured environment variable, or a compromised dependency could remain valid until it was manually revoked. By opting in to expiring access tokens, an app instead receives a short-lived access token alongside a refresh token. When the access token lapses, the application exchanges the refresh token for a new access token without requiring the user to re-authorize the app. This narrows the window during which a stolen credential is useful and aligns GitHub's OAuth apps with a widely recommended pattern in the OAuth 2.0 ecosystem.
The word "opt in" is important here. Because expiring tokens change how an application manages credentials, existing integrations are not forced to adopt the behavior immediately. Developers who enable it will need to implement refresh logic, handle expiry gracefully, and store refresh tokens securely, since a refresh token effectively becomes the long-lived secret in this model. Teams adopting the flow should plan for token rotation and revocation handling as part of the migration rather than treating it as a drop-in switch.
The second change addresses a long-standing friction point: support for multiple redirect URIs on a single app registration. The redirect URI is the callback endpoint GitHub sends users back to after they authorize an app, and it is validated to prevent authorization codes from being redirected to an attacker-controlled destination. Previously, teams often worked around the single-URI limitation by creating separate app registrations for development, staging, and production, or by routing all environments through one endpoint. Allowing multiple registered URIs lets a single app serve several environments or callback paths while still keeping the strict matching that makes redirect validation a security control. It reduces registration sprawl and the configuration drift that can accompany it.
These updates bring OAuth apps closer to the model GitHub already offers through GitHub Apps, and understanding the distinction is useful context. GitHub Apps are the newer, more granular integration type: they act on their own identity via installation tokens, support fine-grained repository and organization permissions, and already issue short-lived tokens by default. OAuth apps, by contrast, act on behalf of a user and have traditionally used broader scopes and non-expiring tokens. GitHub has generally steered developers toward GitHub Apps for new integrations, but OAuth apps remain widely used, so extending expiring-token and refresh support to them appears intended to raise the baseline security of that installed base without requiring a full migration.
The moves also fit a broader industry direction toward short-lived credentials and away from static, long-lived secrets. Refresh token flows, token rotation, and reduced credential lifetimes are increasingly standard guidance in identity and access management, echoed in OAuth 2.0 security best-practice documents and in the credential-handling patterns promoted across major cloud and developer platforms. GitHub has pursued related efforts elsewhere, including fine-grained personal access tokens, push protection and secret scanning to catch exposed credentials, and OpenID Connect support that lets CI/CD workflows obtain short-lived cloud credentials instead of storing static keys.
For developers, the immediate takeaway is that these are opt-in capabilities rather than breaking changes, so existing apps should continue to function while teams evaluate adoption. Those maintaining OAuth apps will likely want to review whether enabling expiring tokens is appropriate for their use case, confirm that their infrastructure can persist and rotate refresh tokens safely, and consolidate any duplicate registrations now that multiple redirect URIs are available. As with any authentication change, testing the refresh and callback flows across environments before enabling them in production is prudent, and consulting GitHub's official changelog and documentation is advisable for the precise configuration steps and any limitations.
本ページの本文と要約は AI による自動生成です。日本語版と英語版は言語ごとに独立して生成されるため、表現や詳しさが異なる場合があります。正確性は元記事 (github.blog) をご確認ください。The body and summaries are AI-generated independently for each language, so wording and detail may differ. Verify accuracy at the original source (github.blog).





