Repository navigation
Conversation
setupOauth accepts a catalog whose token and userinfo endpoints use plain http on localhost or 127.0.0.1, but the callback then refused to fetch them, so a provider running locally (e.g. Keycloak) could never complete a sign-in. Both checks now share one rule.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
This branch was successfully deployed
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.
A generic OAuth provider running on the developer's machine, such as a local Keycloak, could not complete a sign-in.
setupOauthaccepts catalog endpoints that use plain http onlocalhostor127.0.0.1, but the callback'sfetchRefusingRedirectsonly accepted https. The flow then failed at the token exchange withRefusing non-https request to http://127.0.0.1:3299/discord/tokenand redirected back to the app withoauth_error.Both checks now use the same
isSecureEndpointrule: https, or plain http onlocalhostor127.0.0.1. Redirects are still refused, and http on any other host is still refused.Two new tests in
components/oauth/http.test.tscover this. A flow with a token endpoint onhttp://localhostand a userinfo endpoint onhttp://127.0.0.1now mints a ticket (it fails onreboot). A token endpoint on plain http on another host is refused before any request goes out. The core tests, typecheck and ESLint pass.This is part (a) of O-10. Part (b), ignoring an id_token that a plain OAuth provider sends without being asked, is in #746. Part (c),
client_secret_basic, needs an API decision and isn't included.Tracking: O-10 (Notion)