feat(keycardai-oauth): add authorization code exchange and PKCE support#90
Merged
seriousben merged 1 commit intomainfrom Apr 2, 2026
Merged
feat(keycardai-oauth): add authorization code exchange and PKCE support#90seriousben merged 1 commit intomainfrom
seriousben merged 1 commit intomainfrom
Conversation
- Implement PKCE code verifier, challenge generation, and validation - Add authorization code exchange operation (sync and async) - Add build_authorize_url for constructing OAuth authorize URLs - Add exchange_authorization_code to Client and AsyncClient - Add get_endpoints/endpoints property to expose resolved endpoints - Add id_token field to TokenResponse
📦 Release PreviewThis analysis shows the expected release impact: 📈 Expected Version Changes📋 Package Details[
{
"package_name": "keycardai-oauth",
"package_dir": "packages/oauth",
"has_changes": true,
"current_version": "0.7.0",
"next_version": "0.8.0",
"increment": "MINOR"
}
]📝 Changelog PreviewThis comment was automatically generated by the release preview workflow. |
Larry-Osakwe
approved these changes
Apr 2, 2026
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.
Why
The OAuth client supports token exchange but has no support for authorization code flows. The PKCE utilities existed as stubs (
NotImplementedError). Applications that need to drive an authorization code flow (e.g. redirect-based consent) had to implement this outside the SDK.What
PKCEGeneratormethods (verifier, challenge, pair generation, validation) per RFC 7636_authorizeoperation module withbuild_authorize_urlandexchange_authorization_code(sync + async)exchange_authorization_codetoClientandAsyncClientget_endpoints(async) andendpoints(sync) property for callers that need resolved URLsid_tokenfield toTokenResponsebuild_authorize_urlfromkeycardai.oauth