Repository navigation
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
pmathew92
marked this pull request as ready for review
November 16, 2026 05:58
This branch has not been 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.
Changes
Adds PKCE to every embedded
/e/authorizeflow. The server acceptscode_challengeandcode_challenge_methodon the first/e/authorizecall, binds the authorization code to the challenge, and then requires the matchingcode_verifierat/oauth/token. Clients that enforce PKCE, and public clients on tenants with the PKCE-required setting, are rejected without it, so the SDK now always sends it.How it works
authorize()creates a new code verifier for each flow, sends itscode_challengewithcode_challenge_method: "S256", and creates the flow state with the verifier.auth_sessionin that state, so the verifier is kept for the whole flow.code_verifierwith the token exchange. This matters because the state is cleared as soon as the server issues the code, before the exchange runs.authorize()fails locally without sending a request. It never falls back to a flow without PKCE.Classes and methods
AlgorithmHelpermoves fromprovider/AlgorithmHelper.javatoutil/AlgorithmHelper.ktas aninternal open class, so the web-auth and embedded flows share one implementation. Behavior is unchanged.PKCE.javaand its tests only change their import.EmbeddedAuthStatenow holdscodeVerifierand a nullableauthSession. ItstoStringhides both.EmbeddedAuthClientgains aninternalconstructor that takes anAlgorithmHelper, used by tests. The publicEmbeddedAuthClient(auth0)constructor is unchanged.examples/embedded-auth/authorize.mdhas a short note that PKCE is added automatically.Testing
This change adds unit test coverage
This change adds integration test coverage
This change has been tested on the latest version of the platform/language or why not
Checklist
I have read the Auth0 general contribution guidelines
I have read the Auth0 Code of Conduct
All existing and new tests complete without errors