Skip to content

Fix cordova adapter concurrent loadstart handling#273

Merged
jonkoops merged 2 commits intokeycloak:mainfrom
eudamniac:fix/cordova-adapter-concurrent-loadstart-handling
Feb 24, 2026
Merged

Fix cordova adapter concurrent loadstart handling#273
jonkoops merged 2 commits intokeycloak:mainfrom
eudamniac:fix/cordova-adapter-concurrent-loadstart-handling

Conversation

@eudamniac
Copy link
Copy Markdown
Contributor

@eudamniac eudamniac commented Feb 19, 2026

Restoring early completion of processing redirect uri load.

#208 is about an additional authenticate request, which seems to fail fail the login request since these changes in #102.

The completed flag before was set without an await on processCallback, which probably let to the duplicate authenticate request to be ignored since the flag was set to true already when the loadstart event is processed the second time. This PR would kind of restore the old logic by setting the completed flag before awaiting the #processCallback method.

image

Introducing integration test for the cordova adapters does not make sense anymore since the decision for removal in a future version. However, for reference the tests can be looked up here.

Closes #208

@jonkoops
Copy link
Copy Markdown
Contributor

@machete-in-space since you originally reported this issue, could I ask you to test the fix provided here to ensure it works?

jonkoops
jonkoops previously approved these changes Feb 23, 2026
Copy link
Copy Markdown
Contributor

@jonkoops jonkoops left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will likely work good enough, we could clean up the Cordova code more, but right now I will take a simple fix, and it wouldn't make sense considering we are planning to remove the functionality entirely.

@eudamniac eudamniac force-pushed the fix/cordova-adapter-concurrent-loadstart-handling branch from 6b3190e to 721e3b2 Compare February 23, 2026 18:06
@eudamniac eudamniac force-pushed the fix/cordova-adapter-concurrent-loadstart-handling branch from 721e3b2 to 38315a8 Compare February 23, 2026 18:08
@eudamniac
Copy link
Copy Markdown
Contributor Author

@jonkoops sorry, didn't have the signoff commit message - fixed that now

@machete-in-space
Copy link
Copy Markdown

@jonkoops changes work on my end, thanks!

@jonkoops
Copy link
Copy Markdown
Contributor

@machete-in-space Thanks for validating! Does this also fix #209 for you?

@machete-in-space
Copy link
Copy Markdown

@jonkoops No, unfortunately this issue persists. There is still the attempt to load the redirect URL in the in-app-browser. As a workaround I am closing the browser manually on loadstart of the redirect URL. It's not clean but it does the job for now.

@jonkoops
Copy link
Copy Markdown
Contributor

Ok, then I will merge this in, we'll continue discussion on the issue itself. Thanks a lot for the review, and @eudamniac thanks for the PR!

@jonkoops jonkoops merged commit 4034b97 into keycloak:main Feb 24, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Login fails due to race condition in Cordova adapter (v26.2.1)

3 participants