-
Notifications
You must be signed in to change notification settings - Fork 2
IS-11327 LWA: WebAuthn ceremony errors as HAAPI step AppErrors #194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
aleixsuau
merged 42 commits into
integration/IS-5161/login-web-app
from
feature/IS-11327/webauthn-error-handling
May 29, 2026
Merged
Changes from all commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
35b21bd
IS-11327 LWA: WebAuthn ceremony errors as HAAPI step AppErrors
aleixsuau cb48e2b
IS-11327 Rename metadata.messages to metadata.viewData; extract getHa…
aleixsuau 65476cc
IS-11327: reduce doc useless verbosity
aleixsuau 16cc0cb
IS-11327: refactor webauthn error handling
aleixsuau 58574ef
IS-11327 Move shared ClientOperationResult to operations/typings.ts
aleixsuau 2818521
IS-11368 LWA: forward HaapiBaseFormField.required to rendered field i…
aleixsuau 57743ad
IS-11368 Default createMockFormAction fields to required: true.
aleixsuau b7b8fad
IS-11368 Default required attr to true when field.required is omitted.
aleixsuau 20d5905
IS-11368: remove default field required
aleixsuau 6fec68f
IS-11345 Display the configured logo in the LWA.
aleixsuau 01600a7
IS-11318 LWA: rework page symbols data in bootstrap configuration
luisgoncalves a944e6a
IS-5161: remove duplicated wells
aleixsuau 1d13d9b
Merge branch 'integration/IS-5161/login-web-app' into feature/IS-1136…
aleixsuau 90f61bd
Merge pull request #205 from curityio/feature/IS-5161/IS-11318-update…
luisgoncalves f4f9c2b
IS-11345: remove non-used deps
aleixsuau a4c4f2a
Merge pull request #200 from curityio/feature/IS-11368-required-attr-…
aleixsuau 3a4d2d5
IS-11318 LWA: fix propagation of bootstrap configuration in the dev s…
luisgoncalves 7224b9f
IS-5161 Remove header, move app-layout side outside well
4eec80c
IS-5161 Logo spacing tweaks
9fc10cb
IS-11345: refactor to use config provider
aleixsuau cd3eb5a
IS-11345: logo tests
aleixsuau 78ff304
Merge pull request #204 from curityio/fix/integration/IS-5161/login-w…
aleixsuau c1dec04
IS-11327 Rethrow non-DOMException from getWebAuthnErrorType
aleixsuau 7dbbaf6
IS-11327 Type WebAuthn runner mocks against their real signatures
aleixsuau f21525f
IS-11327: remove useless comment
aleixsuau 66bea62
IS-11327: return failed error for null credentials
aleixsuau a1cdd99
IS-11327: remove viewData error messages
aleixsuau c582a9d
IS-5161 Wrap HaapiStepperStepUI in App.tsx with HaapiStepperErrorNoti…
aleixsuau 69660e4
Merge pull request #203 from curityio/feature/IS-5161/wrap-haapi-step…
aleixsuau da52027
Merge pull request #206 from curityio/feature/IS-5161/IS-11318-dev-lo…
luisgoncalves 3db12cb
IS-11327 LWA: WebAuthn ceremony errors as HAAPI step AppErrors
aleixsuau 78d2938
IS-11327 Rename metadata.messages to metadata.viewData; extract getHa…
aleixsuau e1211c7
IS-11327: reduce doc useless verbosity
aleixsuau bd01831
IS-11327: refactor webauthn error handling
aleixsuau 836c0d7
IS-11327 Move shared ClientOperationResult to operations/typings.ts
aleixsuau 15a4654
IS-11327 Rethrow non-DOMException from getWebAuthnErrorType
aleixsuau 7b76888
IS-11327 Type WebAuthn runner mocks against their real signatures
aleixsuau c65a98f
IS-11327: remove useless comment
aleixsuau e7eacaf
IS-11327: return failed error for null credentials
aleixsuau 1784e8c
IS-11327: remove viewData error messages
aleixsuau e6b4e00
Merge branch 'feature/IS-11327/webauthn-error-handling' of github.com…
aleixsuau ebd5201
IS-11327 Move getHaapiStepperError to operations/helpers.ts
aleixsuau File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
53 changes: 53 additions & 0 deletions
53
src/identity-server/templates/core/fragments/api-driven-ui/theme.vm
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| #* | ||
| * Copyright (C) 2026 Curity AB. All rights reserved. | ||
| * | ||
| * The contents of this file are the property of Curity AB. | ||
| * You may not copy or use this file, in either source code | ||
| * or executable form, except in compliance with terms | ||
| * set by Curity AB. | ||
| * | ||
| * For further information, please contact Curity AB. | ||
| *# | ||
|
|
||
| { | ||
| logo: { | ||
| path: '$!logo_path', | ||
| isInsideWell: #if ($logo_inside) true #else false #end, | ||
| }, | ||
| #if ($show_symbol) | ||
| #macro(symbolPath $jsonKey $pathVariable) | ||
| #if($pathVariable)'$jsonKey': '$!pathVariable',#end | ||
| #end | ||
|
|
||
| pageSymbols: { | ||
| ## Map of plugin implementation type to symbol path. | ||
| ## Used as a fallback if an exact match for the page symbol is not found in 'views'. | ||
| plugins: { | ||
| #* Authenticators *# | ||
| #symbolPath("bankid" $page_symbol_authenticate_bankid) | ||
| #symbolPath("duo" $page_symbol_authenticate_pair_device) | ||
| #symbolPath("email" $page_symbol_authenticate_email) | ||
| #symbolPath("html-form" $page_symbol_authenticate_htmlform) | ||
| #symbolPath("openid-wallet" $page_symbol_openid_wallet) | ||
| #symbolPath("passkeys" $page_symbol_authenticate_passkeys) | ||
| #symbolPath("sms" $page_symbol_authenticate_sms) | ||
| #symbolPath("totp" $page_symbol_authenticate_totp) | ||
| #symbolPath("webauthn" $page_symbol_authenticate_webauthn) | ||
|
|
||
| #* Authentication ACtions *# | ||
| #symbolPath("opt-in-mfa" $page_symbol_authenticate_opt_in_mfa) | ||
| #symbolPath("require-active-account" $page_symbol_authenticate_htmlform) | ||
| #symbolPath("reset-password" $page_symbol_authenticate_htmlform) | ||
| #symbolPath("signup" $page_symbol_authenticate_htmlform) | ||
|
|
||
| #* Consentors *# | ||
| #symbolPath("bankid-signing-consentor" $page_symbol_authenticate_bankid) | ||
| }, | ||
| ## Map of view/template name to symbol path. | ||
| views: { | ||
| ## Nothing to add for now | ||
| }, | ||
| default: '$!page_symbol', | ||
| } | ||
| #end | ||
| } |
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
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
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
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
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
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
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
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
33 changes: 33 additions & 0 deletions
33
src/login-web-app/src/haapi-stepper/feature/actions/client-operation/operations/helpers.ts
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| /* | ||
| * Copyright (C) 2026 Curity AB. All rights reserved. | ||
| * | ||
| * The contents of this file are the property of Curity AB. | ||
| * You may not copy or use this file, in either source code | ||
| * or executable form, except in compliance with terms | ||
| * set by Curity AB. | ||
| * | ||
| * For further information, please contact Curity AB. | ||
| */ | ||
|
|
||
| import { HAAPI_PROBLEM_STEPS, HaapiUserMessage } from '../../../../data-access/types/haapi-step.types'; | ||
| import { HaapiStepperError } from '../../../stepper/haapi-stepper.types'; | ||
| import { formatErrorStepData } from '../../../stepper/data-formatters/problem-step'; | ||
|
|
||
| /** | ||
| * Synthesises a {@link HaapiStepperError} for a client-operation failure (IS-11327). | ||
| * | ||
| * Client-operation failures (WebAuthn ceremony cancel / timeout / parse error / unsupported | ||
| * API today; BankID / EBF on the same pattern when their per-operation error handling lands) | ||
| * happen on the client and aren't part of the HAAPI response, so the stepper has no native | ||
| * category for them. We treat them as `AppError`-class problems of the current step — building | ||
| * a `HaapiUnexpectedProblemStep` via {@link formatErrorStepData} — so they surface via | ||
| * `useHaapiStepper().error.app` like any server-driven problem and consumers handle them | ||
| * through the same channel (e.g. `HaapiStepperErrorNotifier`). | ||
| */ | ||
| export function getHaapiStepperError(messageText: string | undefined): HaapiStepperError { | ||
| const messages: HaapiUserMessage[] = messageText ? [{ text: messageText }] : []; | ||
| return formatErrorStepData({ | ||
| type: HAAPI_PROBLEM_STEPS.UNEXPECTED, | ||
| messages, | ||
| }); | ||
| } |
27 changes: 27 additions & 0 deletions
27
src/login-web-app/src/haapi-stepper/feature/actions/client-operation/operations/typings.ts
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| /* | ||
| * Copyright (C) 2025 Curity AB. All rights reserved. | ||
| * | ||
| * The contents of this file are the property of Curity AB. | ||
| * You may not copy or use this file, in either source code | ||
| * or executable form, except in compliance with terms | ||
| * set by Curity AB. | ||
| * | ||
| * For further information, please contact Curity AB. | ||
| */ | ||
|
|
||
| import { HaapiFetchFormAction } from '../../../../data-access'; | ||
| import { HaapiStepperError } from '../../../stepper/haapi-stepper.types'; | ||
|
|
||
| /** | ||
| * Discriminated-union return shape shared by all client-operation runners (WebAuthn, | ||
| * external-browser-flow, BankID — as each ports onto this pattern per IS-11327). | ||
| * | ||
| * Runners always resolve. Success carries the continuation form action + payload; failure | ||
| * carries a synthesised {@link HaapiStepperError} which `performClientOperation` forwards to the | ||
| * stepper, which routes it through `setError` → `useHaapiStepper().error.app`. Programming | ||
| * bugs / unexpected runtime errors are not represented here — those still throw and escape to | ||
| * the React error boundary. | ||
| */ | ||
| export type ClientOperationResult = | ||
| | { clientOperationData: HaapiFetchFormAction; clientOperationError?: undefined } | ||
| | { clientOperationData?: undefined; clientOperationError: HaapiStepperError }; |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.