[DX-2624] feat: set pkce result if user is in the correct state #161
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
Sometimes, the
LoginPKCE
/ConnectImxPKCE
function might get triggered twice in the integrating game. As a result, the second call can result in an error due to the absence ofpkceCompletionSource
to return a result, as the first call has already nullified it.Added a flag to check if the user is currently logged in and only call
TrySetPKCEResult
if the user is in the correct state:TrySetPKCEResult
for login if the user is not currently logged inTrySetPKCEResult
for logout if the user is currentlyCustomer Impact
N/A