feat(keycardai-oauth)!: multi-resource web-app flow - #245
Merged
Larry-Osakwe merged 2 commits intoAug 29, 2026
Conversation
begin_authorization takes resources: list[str] | None and passes it straight through to the authorize-URL builder, so several RFC 8707 resource parameters can be requested in one authorization. AuthorizationRedirect carries the resources so apps persist them with state and the verifier. complete_authorization no longer sends a resource parameter on the token request: the authorization server derives the audience from the code, so the parameter never affected redemption. resource_url survives one release as a deprecated keyword on both calls (mapped to resources=[resource_url] on begin, a no-op on complete), and raises when combined with resources.
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
…window The web-app flow shipped days ago with one known consumer, so the deprecation shims bought nothing. begin_authorization takes resources only; complete_authorization takes no resource in any form.
Larry-Osakwe
approved these changes
Aug 29, 2026
Larry-Osakwe
deleted the
devin/1787958599-oauth-multi-resource-web-flow
branch
August 29, 2026 00:34
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.
Summary
The web-app flow could only ever authorize one resource, even though the authorize-URL builder it calls already takes a list and emits repeated RFC 8707
resourceparameters.begin_authorizationnow exposes that list, andcomplete_authorizationstops sending aresourceon the token request at all — the server derives the issued token's audience from the authorization code, so the parameter was inert there.resource_urlis removed outright on both calls, no deprecation window: the flow shipped days ago with one known consumer, so the breaking release is the cleanest contract. Passing it raises TypeError.Two internals follow from dropping the token-request
resource: challenge-drivencomplete_authorizationno longer requires any resource to resolve the issuer (it calls the publicresolve_issuer_from_challengedirectly instead of_resolve_auth_server_url, whose only use ofresource_urlwas a presence check), while challenge-drivenbegin_authorizationkeeps that requirement, now phrased in terms ofresources.pkce/client.py(the loopbackauthenticateflow) is untouched.The sdk-spec change this implements is keycard-sdk-spec#53 (open); merge that first. The spec now specifies the clean break, so no open questions remain.
Link to Devin session: https://app.devin.ai/sessions/7086dca212ec4b24a91c3c1623d4abb7
Open in Devin Desktop: https://app.devin.ai/desktop/session/7086dca212ec4b24a91c3c1623d4abb7?variant=devin
Requested by: @Larry-Osakwe