Repository navigation
Replies: 2 comments 2 replies
|
Another option, which came up to mind is to totally shift the logic away from the various 2fa required actions (otp, webauthn, ...) to the recovery codes action itself. Any thoughts to that? |
2 replies
|
Closing this issue, as there seems not to be any interest |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
This is a follow-up issue of issue #41836 based on the comment #41849 (comment) by @ahus1
With PR #41849 we have added the option to automatically execute the recovery codes required action after a user has configured an OTP. This was implemented directly into the code of the
UpdateTOTPrequired action class.As there might be other mfa required actions (like e.g. the WebAuthn action), which will also benefit from this option, it might be worth to generalize this code somehow. I wanted to discuss possible solutions first in a discussion, before creating an issue for it.
Like @ahus1 and me already discussed in-person, the first approach could be to provide another intermediate interface, which implements this logic as default methods. This would then look like this:
RequiredActionInterface -> NewIntermediateInterface -> ConcreteActionImplementationThis turns out, that it is basically feasible, but yields in having two (2!) intermediate interfaces. One for the
ProviderFactoryand one for theProvider. The implemented code is split across both classes, as the configuration thing is done in the factory and the runtime logic in the provider class.This wasn't obvious at first, as the
UpdateTOTPclass implements both interfaces, the factory AND the provider. But for other actions, like e.g. the already mentioned WebAuthn credential action, it's not possible to only one (combined) class and thus it would be required to have two interfaces.Does this make sense to introduce two intermediate interfaces for the automatic recovery code issuance for mfa?
@ahus1 WDYT? Is it worth to give it PR?
All reactions