fix(issuer): align implicit flow with RFC 6749#22
Merged
swalker326 merged 4 commits intomasterfrom Mar 21, 2026
Merged
Conversation
shpaw415
approved these changes
Mar 20, 2026
There was a problem hiding this comment.
This PR introduce a fix the of the malformed flow, displayed in the RFC 6749.
I reviewd:
-
RFC 6749 Compliance
The implementation perfectly aligns with Section 4.2.2 of the spec. Specifically, removing the refresh_token from the response_type=token flow is a key security correction. Including token_type=Bearer and expires_in in the URI fragment ensures we are now fully compliant with standard expectations for implicit grants. -
Test Coverage & Validation
I've reviewed the changes in packages/openauth/test/issuer.test.ts. The new test cases effectively validate the shape of the fragment response and is specific of the assigned token flow.
Approved!
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
refresh_tokenvalues forresponse_type=tokenand includetoken_type=Bearerplusexpires_inin the fragment responseValidation
bun test packages/openauth/test/issuer.test.tsbun run --filter "@kagii/openauth" typecheckbun run --filter "@kagii/openauth" checkPlatform fit
issuer()and reuses the existinggenerateRefreshToken: falseoption already supported by our forkCredit