Repository navigation
feat(auth): add two-factor sign-in with authenticator apps - #26
Merged
Merged
Conversation
TOTP (RFC 6238) two-factor sign-in, turned on per user under My profile -> Security: server-side QR setup, ten single-use recovery codes, optional "remember this device", and admin reset. Authentication:TwoFactor:RequireForAdministrators (off by default) makes it mandatory for administrators who sign in with a password. Codes can't be replayed, wrong codes count towards the normal lock-out, and the failed-attempt counter is now reset only after the second step. Secrets are stored encrypted, recovery codes hashed. Adds migration AddUserTwoFactor, locale keys, docs/two-factor.md and the QRCoder (MIT) package. Closes #12
- Always mark the remembered-device cookie Secure (S2092) - Rename AuthMethod constants away from "Password" (S2068) - Handle the clipboard promise when copying recovery codes (S9383) - Make display-only/posted value-type model properties nullable (S6964) - Focus the code field from script instead of autofocus (S9379) - Fix the recovery/app toggle after a wrong recovery code
|
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 #12. Builds on #25 (SSO); change the base to
developonce #25 is merged.Two-factor sign-in with any authenticator app (TOTP). Docs: docs/two-factor.md.
Authentication:TwoFactor:RememberDeviceDays, default 30), invalidated when 2FA is reset or re-enabled.Authentication:TwoFactor:RequireForAdministrators(off by default).Upgrade: one additive migration (
AddUserTwoFactor, two new tables) and new translations; the Docker migrate container applies both. New NuGet dependency: QRCoder (MIT).Tests: unit tests incl. RFC 6238 / RFC 4648 vectors, replay, recovery codes, remembered-device tokens and the admin policy; plus 30 end-to-end scenarios against a running instance.