This can break a sign-in flow in two places: the callback URL saved in GitHub settings and the redirect_uri your application sends at runtime. Changing only one side still leaves a mismatch.
Who needs to check
Find fragments in configuration and code
Search for callback, redirect_uri, and login/oauth/authorize in application code, deployment variables, infrastructure configuration, and GitHub App or OAuth App settings. Search for a literal # in values that look like URLs, but also inspect code that appends a fragment after constructing the callback string.
# Before: the fragment is part of the registered redirect URL
https://app.example.com/github/callback#signed-in
# After: keep the callback URL free of fragments
https://app.example.com/github/callbackMove client state out of the fragment
Fragments are often used to tell a single-page app which screen to show after sign-in. Replace that routing convention with a normal callback path, a validated query value, or server-side session state keyed by state. Do not copy a fragment into a query parameter without deciding whether it is trusted input and validating the destination before navigating.
Keep the security properties of the flow
GET https://github.com/login/oauth/authorize?client_id=CLIENT_ID&redirect_uri=https%3A%2F%2Fapp.example.com%2Fgithub%2Fcallback&state=RANDOM_STATE&code_challenge=CODE_CHALLENGE&code_challenge_method=S256GitHub App callback details
Be careful with wildcard callback matching
Removing a fragment does not mean you should solve every mismatch with a wildcard. With wildcard matching, the host and port still need to match while subdomains and subdirectories can be accepted. GitHub warns that this can expose authorization codes to unintended locations, so use exact callback URLs when possible and disable wildcard matching if you do not need it.
Native and desktop apps
If your app uses a loopback callback, use a literal loopback address such as http://127.0.0.1/path or the IPv6 loopback address instead of localhost. A loopback redirect can include a local port for the running app, but the callback path still needs to be registered without a fragment.
A safe migration plan
Inventory every OAuth and GitHub App callback URL. Remove fragments from the provider settings and runtime redirect_uri values. Replace fragment-based client routing with a validated path, query value, or server-side state. Test authorization, callback state validation, and code exchange in every environment. Then test a deliberately rejected callback so a future mismatch is visible instead of silently redirected.
During the migration, log the callback host and path, not authorization codes, client secrets, state values, or tokens. This gives you enough evidence to find an environment mismatch without turning the login callback into a credential leak.
Bottom line
GitHub's February 2027 change is small in syntax and large in reach. Remove # fragments from registered callback URLs and runtime redirect_uri values now, keep state and PKCE intact, and prefer exact callback matching. A callback inventory today is cheaper than finding a broken sign-in flow after GitHub starts rejecting requests.
