Repository navigation
Replies: 2 comments 6 replies
|
On (3): yes, that's an intended use. Keycloak ships Option A almost verbatim as a quickstart, action-token-authenticator: an authenticator creates an action token for the current auth session, redirects to an external app, the app returns through the action-token URL, and the handler resumes the flow. Worth copying from ExternalAppAuthenticator:
On (4): Keycloak's default CSP is just My take (opinion, not an official position): for something you'll reuse in reset-credentials and step-up, A ages better. The SCA UI is an app you own and deploy on its own, not a theme you re-test on every Keycloak upgrade, and Keycloak only sees "left, came back with a result". On (6): mostly right. On (5) I'm not aware of anything official for a fully external login UI; themes (FTL or Keycloakify) are still the way as far as I know. |
|
One detail worth adding to the quickstart recommendation: action-token processing does not always resume the original authentication session. The [26.2.4 documentation](https://github.com/keycloak/keycloak/blob/26.2.4/docs/documentation/server_development/topics/action-token-handler-spi.adoc) says that when the authentication-session ID does not match, the handler can start a fresh session. You can reject that through For your SCA flow, I would explicitly reject a session mismatch if the approval belongs exclusively to the original login attempt. Otherwise, an expired session or a return in another browser context could behave differently from “resume this exact flow.” I would also treat these as separate checks:
Bin 8000 d the challenge to the authentication attempt and purpose, and consume completion atomically so duplicate callbacks cannot reuse an approval. The documentation also notes that single-use action tokens are invalidated when authentication completes, with additional handling needed for flows using multiple action tokens. On A versus B, I would lean toward B if an independently deployed SCA UI is not already a requirement. Keeping the form inside the authenticator reduces the cross-application return handling you need to maintain. A makes sense when owning and deploying that UI separately is important. The [current developer guide](https://www.keycloak.org/docs/latest/server_development/index.html#_action_token_handler_spi) labels the action-token handler SPI as internal, so I would include extension compatibility checks in upgrade testing for A. Useful tests for either design would be: expired login session, two simultaneous tabs, duplicate submission, cancellation followed by late approval, and a password-reset challenge presented during login. These are documentation-based suggestions; I have not reproduced your custom flow. Is your external SCA UI already deployed, or would you build it specifically for this integration? |
Uh oh!
There was an error while loading. Please reload this page.
Hi all,
We’re moving Strong Customer Authentication (SCA) into Keycloak and would like advice on the recommended way to build it.
Context
Option A: custom authenticator + redirect to an externally hosted SCA UI (action token)
Option B: custom authenticator + custom login theme page (Keycloakify with Angular)
In both options, the final decision is made server-side in the authenticator. We never trust a browser-side “SCA done” signal.
Questions
Thanks in advance for any guidance or pointers to examples.
All reactions