fix(android): preserve request configuration and honor code-only responses - #386
Open
OskarEichler wants to merge 1 commit into
Open
fix(android): preserve request configuration and honor code-only responses#386OskarEichler wants to merge 1 commit into
OskarEichler wants to merge 1 commit into
Conversation
|
|
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.
Fixes: isolate in-flight sign-ins and honor CODE responses
configurewhile sign-in is pending must not return the replacement configuration's nonce with the original credential.ResponseType.CODEinstead of always requesting code and ID token.ID_TOKENas the existing ALL behavior and document/deprecate that legacy value. Apple requires code; this avoids introducing an unsupported ID-token-only request. This follows the unresolved response-type discussion in Configuration of Sign in with Apple on Android ignores scope and response type options #362/fix(android): pass the specified scope when creating configuration #363.Compatibility / observable changes
CODE now produces a code-only request as documented. Applications that selected CODE but relied on the previously accidental ID token should select ALL explicitly. Defaults, ALL and legacy ID_TOKEN retain their request behavior. No exports or enum values are removed.
Reproduction
Compiled the actual Java module with isolated Android/React bridge/service stubs. Six cases cover three response types and enabled/disabled nonces, replacing configuration before callback. Baseline has two response-type mismatches and six nonce mismatches; the fix has zero of either. This is not a live OAuth flow.
Verification
5f7a8d7with the fix; no test/spec files were changed.