Repository navigation
feat(angular): authenticator app enrollment, sign-in and settings screens - #221
Merged
Merged
Conversation
…eens Adds the authenticator-code and register-authenticator screens, offers an authenticator app from the sign-in fallbacks and from register-passkey (for a recovery session, and on a device without passkeys), and adds a router-independent SaAuthenticatorAppSettings component. The service exposes a recoverySession signal, and a recovery session can no longer skip passkey enrollment.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #215. Stacked on #218 (shared client pieces); merge that first.
Summary
Authenticator app (TOTP) screens for the Angular binding.
paths.tsandroutes.tsadd two new screens:register-authenticator(SaRegisterAuthenticator) is enrollment with a recovery-session subtitle. It ends on "Authenticator App Added" and continues whereregister-passkeydoes. On a device with passkeys it offers "Use a passkey instead".authenticator-code(SaAuthenticatorCode) signs in withsignInWithTotp, reusingsa-otp-input.SaAuthenticatorEnrollment: a new reusable piece with:qrCode()and the setup key with a copy buttonotpauth:links unsafe, so thehrefis set directly, and only for anotpauth://URL. That avoids a new@angular/platform-browserpeer dependency.SaFallbackOptionsgains anofferAuthenticatorinput (off by default) and anauthenticatoroutput.SaLoginturns it on whenever a sign-in is in progress.register-passkey:SaAuthenticatorAppSettings(exported from@seamless-auth/angular/routes). It shows status and last use, sets up an app inline, and turns it off with a current code.recoverySessionsignal.Step-up prompts are out of scope here. The Angular binding prompts for step-up nowhere yet, and the README says so.
Tests
screens.test.ts: sign-in, enrollment, and the authenticator options onregister-passkey.authenticatorAppSettings.test.ts.Checks
lint, typecheck (ngc), format:check, build (with
finalize-angular-dist) and test (jest 807 passed, vitest 42 passed) all pass.