Check SSO with required actions

96 views
Skip to first unread message

Olivier Boudet

unread,
Sep 10, 2021, 5:39:53 AM9/10/21
to Keycloak Dev
Hello,

I have a use-case where I want to handle interaction_required error in my application using check-sso.
From my testing, the check-sso iframe silently catch all errors and returns unauthenticated. So interaction_required errors are also ignored.

I modified the js adapter by adding a new initOptions allowing to force the prompt option in the callback when an error is receive. Please see this commit : https://github.com/olivierboudet/keycloak/commit/eacd1655ae94d2ea3133417c0c08525278f40909

It allows me to catch error in my application by implementing "onAuthError" callback, and call "kc.login()" when error interaction_required is found to force my users to execute required actions.

Could you please tell me if it makes sense ? Is it a bug/enhancement to js adapter which may be fix/added or does it create other issues ?

Thank you for you feedback
Reply all
Reply to author
Forward
0 new messages