-
Notifications
You must be signed in to change notification settings - Fork 217
feat(mfa): Add MFA endpoints for TOTP setup #19473
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
Conversation
c86e782 to
6c5e617
Compare
toufali
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for the additional documentation!
I tried running the tests locally to confirm working as expected, but it doesn't look like the tests ran via nx test-integration fxa-auth-server ? I'm probably running the wrong suite...
19a22a8 to
a038052
Compare
| ? `${config.serviceName} - ${environment}` | ||
| : `${config.serviceName}`; | ||
|
|
||
| // Shared handlers for TOTP replace flows (used by legacy and /mfa routes) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move the handler back into the sessionToken route to follow the preferred pattern
Because: * We will be wrapping TOTP creation flow with an MFA guard, this sets up the backend support This commit: * Adds MFA-variants of the TOTP setup endpoints * Adds and updates unit tests * Adds integration tests for the MFA routes * Adds docs for the new endpoints and a bit of extra docs for the original session-token-based endpoints * Adds a little mail helper to obtain the MFA code in tests Issue #FXA-12229
a038052 to
2ee5f4b
Compare
| }); | ||
| }); | ||
|
|
||
| // MFA-prefixed routes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are removing these tests - they duplicate the session token version of the routes (shared handler)
| }, | ||
| }, | ||
| handler: async function (request) { | ||
| return routes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
dschom
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
Because
This pull request
Issue that this pull request solves
Issue: FXA-12229
Checklist
Put an
xin the boxes that applyScreenshots (Optional)
Please attach the screenshots of the changes made in case of change in user interface.
Other information (Optional)
This is the backend portion of the work needed for FXA-12229