GitHub OAuth redirect URI fragments rejected from 1 February 2027: how to fix your callback URL
GitHub will reject OAuth sign-in requests whose redirect URI contains a # fragment from 1 February 2027. Here is who is affected, what to change and how to check your apps.
· 8 min read
Written by AI from the sources linked below. How we use AI
On this page
If your app signs people in with GitHub and its callback URL contains a #, it will stop working on 1 February 2027. GitHub announced on 30 November 2026 that, from that date, github.com will reject OAuth authorization requests whose redirect URI includes a URL fragment, and will no longer let developers register callback URLs that contain one. The fix is small (remove the fragment), but the places a fragment can hide are not obvious, and a sign-in failure is the kind of bug users report before monitoring does.
Key points
- From 1 February 2027, github.com rejects OAuth authorization requests whose redirect URI contains a URL fragment (the
#and everything after it). - It applies to both OAuth apps and GitHub Apps on the Free, Team and Enterprise Cloud plans; GitHub Enterprise Server is not covered by this change.
- Until then, affected apps show a warning in their settings and users signing in see a caution message.
- GitHub calls fragments a security risk and says they are not part of the OAuth 2.0 specification; RFC 6749 says a redirection endpoint URI "MUST NOT include a fragment component."
- You also won't be able to register new callback URLs with a fragment after enforcement.
What to do
Who is affected. Any GitHub OAuth app or GitHub App that registers a callback URL containing a #, or that sends a redirect_uri parameter containing one. Apps whose callbacks have no fragment are not affected. GitHub Enterprise Server installations are out of scope for this change.
What to change, before 1 February 2027:
- Edit the registered callback URLs. In your OAuth app's settings, or your GitHub App's "user authorization callback URL" (not the setup URL, which is a different field), remove the fragment. For example, change
https://example.com/callback#sectiontohttps://example.com/callback. - Check the
redirect_uriyour code sends. The parameter is optional, but if your app sends it, it must not contain a fragment either. GitHub uses it to match the value used when the code was issued, so keep the authorization request and the token exchange consistent. - Know the default. If you leave
redirect_uriout, GitHub redirects to the first callback URL configured in the app's settings. If that first entry is the one with a fragment, you are affected even though your code never mentions it. - Move navigation into your app. If the fragment was used to land users on a particular screen after login, store the destination before sending the user to GitHub (for example in your own session or in the
stateparameter's server-side record), then route there after the callback finishes. - Test every sign-in path in staging and production, including any with wildcards or multiple callback URLs.
How to check whether you're affected. Open the settings of each OAuth app and GitHub App you own, including apps in organisations and old ones nobody maintains, and look at the callback URL list for #. GitHub says affected apps show a warning there. Then search your code and configuration for redirect_uri and for the registered callback strings.
What happened
GitHub published the notice in its changelog on 30 November 2026 under the title "Deprecating redirect URI fragments for OAuth and GitHub Apps." The wording is plain: from 1 February 2027 GitHub "will reject OAuth authorization requests that use a redirect URI containing a URL fragment." GitHub says that if your app's callback URL includes a fragment, you should remove it now. It adds that, after enforcement, developers will no longer be able to register or use such a redirect URI.
GitHub's reasoning is that redirect URIs with fragments "aren't part of the OAuth 2.0 specification" (it cites RFC 6749 section 3.1.2.3) "and introduce a security risk, since a fragment can be used to intercept an authorization code or token during a redirect." The changelog does not describe a specific attack or incident, and we did not find one documented elsewhere. The warning and the caution message are the transition period: the settings warning is for developers, and the caution message is shown to people who sign in through an affected app.
GitHub's documentation was updated to match. The page on authorizing OAuth apps now carries a note that github.com will reject authorization requests using a redirect URL with a fragment, such as https://example.com/callback#section, and that such callback URLs can't be registered either. The GitHub Apps page on the user authorization callback URL carries the same notice.
Background
OAuth 2.0 is the protocol behind "Sign in with GitHub." In the web application flow, your app sends the user to GitHub with a client_id, and optionally a redirect_uri, scope, state and PKCE code_challenge. After the user approves, GitHub sends their browser back to your callback URL with a temporary code and your state as query parameters. Your server then exchanges that code, along with your client secret, for an access token.
The standard is specific about where the response goes. RFC 6749 section 3.1.2 says the redirection endpoint URI must be an absolute URI, may include a query component (which must be kept when parameters are added), and "MUST NOT include a fragment component." Section 4.1.2 says the authorization code is delivered by adding parameters to the query component of the redirection URI, using an HTTP redirect. A fragment is a client-side piece of a URL that browsers do not send to servers, which is one reason single-page apps have used it for routing. GitHub's rule brings its implementation in line with what the specification already said, rather than adding a new restriction.
The change lands after a busy year for GitHub's redirect handling. In a community announcement dated 14 August 2026, GitHub said OAuth apps can now register up to 10 redirect URIs (previously one), that both OAuth apps and GitHub Apps can switch on wildcard matching per redirect URI, and that OAuth apps can get short-lived eight-hour access tokens with refresh tokens. GitHub's documentation says that apps that had a single callback URL enabled before 3 August 2026 have wildcard matching enabled for it, and recommends turning it off if you don't need it, warning that wildcards "can expose your app to security risks" because a code could be sent to any subdomain or subdirectory of the callback URL. A maintainer in the same thread said the wildcard option is not scoped further and recommended against it as a best practice.
Taken together, the two changes point the same way: fewer ambiguous redirect targets. If you are touching your callback configuration for the fragment anyway, it is a good moment to check wildcard matching as well, since it is the other setting that decides where authorization codes can land.
How it works
Matching is strict when wildcards are off: the redirect URL must exactly match a registered callback URL. When wildcard matching is on, GitHub says the host (excluding subdomains) and port must match exactly and the path must be a subdirectory of the callback URL, so https://example.com/path/subdir/other and https://oauth.example.com/path both pass for a callback of https://example.com/path, while a different port fails.
The fragment rule sits on top of that. A callback of https://example.com/callback#section fails the new check, and a redirect_uri of https://example.com/callback#section is rejected even if the registered callback is clean. In other words, there are two places to fix: what is registered with GitHub, and what your code sends.
What it means
For single-page apps. The most likely victims are apps that used a hash router and registered a callback such as https://app.example.com/#/auth/callback, so that GitHub would send users back into a client-side route. That pattern is our inference about common practice, not something GitHub's notice says; but it is exactly the shape of URL that will now fail. The replacement is a real path (/auth/callback) that your app or a small server route handles, followed by a client-side redirect to the saved destination.
For maintainers of forgotten apps. Old OAuth apps owned by former employees, side projects or archived integrations are the ones that will break silently. Ownership of an app matters: only people with access can edit its callback URL, so use the window before February to find the owners.
For platform and security teams. GitHub is removing a way for a callback to be ambiguous. It is a modest hardening, but it is also a cheap audit trigger: if you manage many apps, you now have a reason, and a deadline, to review callback URLs and wildcard settings together. Commenters in GitHub's August thread asked for an API or CLI to audit wildcard settings across many apps; a GitHub maintainer replied that app registration APIs are on the backlog with no dates, so the audit is manual for now.
For users. People signing in through an affected third-party app will start seeing a caution message before February, and a failed sign-in afterwards. If a service you use suddenly can't sign you in with GitHub after 1 February, that service's developers need to change their configuration; there is nothing for you to fix.
What we don't know yet
- The exact failure mode. GitHub says it will "reject" such requests but does not document the error page or error code a user or developer will see.
- When warnings start. The changelog says warnings are shown "in the meantime" but gives no start date for the settings warning or the user caution message.
- GitHub Enterprise Server. The notice says the change does not apply to it; it says nothing about whether it will later.
- Scope of impact. GitHub has not said how many apps use fragments.
- Other providers. We did not check whether other OAuth providers enforce the same rule.
What to watch next
- The settings warning in your apps' pages, and any email from GitHub to app owners.
- Updates to GitHub's documentation pages for OAuth apps and GitHub Apps, which currently carry the 1 February 2027 note.
- Any further tightening of redirect handling, since GitHub's own docs point to the OAuth 2.0 Security Best Current Practice for the wildcard risk.
Sources
- Deprecating redirect URI fragments for OAuth and GitHub Apps (primary source, GitHub changelog, 30 November 2026)
- Authorizing OAuth apps (GitHub Docs)
- About the user authorization callback URL (GitHub Docs)
- RFC 6749: The OAuth 2.0 Authorization Framework (IETF)
- New OAuth App features: multiple redirect URIs, wildcarding, and token expiration and refresh (GitHub community discussion, 14 August 2026)
- GitHub to block OAuth redirect URI fragments on February 1, 2027 (WindowsForum, secondary summary)
Written by
The official account of the people who run audiotale.net: announcements, conversation starters and the newsroom's drafts. Posts written with AI say so. Every other account here is a real person.
Read next

SAP confirms GitHub security incident: stolen tokens and altered code reported, no customer data access found
SAP says it found suspicious activity and protected customers; Der Spiegel reports attackers used stolen employee tokens to copy and alter code on GitHub, which SAP has not confirmed.
audiotale.net team7 min read
Copilot code review billing: org pays by default from 30 December 2026
GitHub will bill Copilot code reviews to the repository's organization by default from 30 December, unless an admin saves a billing choice first.
audiotale.net team6 min read
Claude Ship: Code Review, PR Steward and Approvals can approve GitHub pull requests
Anthropic's Claude Ship lets AI review, fix and, under a repository policy, approve pull requests; here is how it works, what it costs and what to check first.
audiotale.net team8 min read