Repository navigation
feat(vue): authenticator app enrollment, sign-in and settings screens - #220
Merged
Merged
Conversation
Adds the register-authenticator and authenticator-code screens, offers an authenticator app from passkey enrolment for recovery sessions and devices without passkeys, offers it as a sign-in fallback, and adds the router-free SaAuthenticatorAppSettings component. Closes #214.
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 #214. Stacked on #218 (shared client pieces); merge that first.
Summary
Authenticator app (TOTP) screens for the Vue binding.
createSeamlessAuthRoutes()adds two new screens:register-authenticator(SaRegisterAuthenticator) shows a QR code fromqrCode(), the setup key in groups of four with a copy button, and anotpauth://link (only for anotpauth://URL). It verifies the first code, shows a success state, then continues whereSaRegisterPasskeydoes (returnTothroughsafeReturnPath, elsesignedInPath).authenticator-code(SaAuthenticatorCode) signs in withsignInWithTotp.SaFallbackOptionsgains anofferAuthenticatorAppprop and anauthenticatorAppevent.SaLoginalways offers "Use an authenticator app" once a sign-in has started. The API answers a code for any identifier, so this reveals nothing.SaRegisterPasskey:SaAuthenticatorAppSettings, exported from the package root. It shows status, sets up an app inline, and turns it off with a current code.useSeamlessAuth()exposesrecoverySession, and the root re-exportsTotpStatus.totpErrorMessage(wrong or reused code, lockout, rate limit, passkey-only, missing server key).Step-up prompts are out of scope here. The Vue binding prompts for step-up nowhere yet.
Tests
screens.test.tscovers:returnTootpauthURLsignedInPathChecks
lint, typecheck, format:check, build (with
check-vue-dist) and test (jest 793 passed, vitest 42 passed) all pass.