-
Notifications
You must be signed in to change notification settings - Fork 9
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
Only show the reauth modal if a primary 2FA provider is enabled #161
Conversation
Two_Factor_Totp
is enabled
While this would solve the current setup, I don't think we necessarily want to limit this to just TOTP since we are introducing webauthn too and that would require another fix here - is there any alternative method? |
#157 introduces a |
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.
I think the root cause for this is actually an upstream bug. I've opened WordPress/two-factor#565 and WordPress/two-factor#566 for that.
I think that will fix this, but haven't tested yet since it's still a WIP.
a719132
to
87c111d
Compare
87c111d
to
89cb162
Compare
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.
This works for me, although I've added a few comments on the method of checking, since I think it'd be better to intersect arrays rather than checking for specific keys
Two_Factor_Totp
is enabled8f430ee
to
6a7290f
Compare
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 👍🏻
Fixes #160
This checks whether the
Two_Factor_Totp
is available before showing the reauth modal.In the current state the backup codes are still accessible, but I believe the intention with #47 is to disable access to that screen as well if the
Two_Factor_Totp
provider is unavailable, see #157