Skip to content
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

Allow overwriting/extending of the 2FA logic #313

Closed
AlexWinder opened this issue Oct 6, 2020 · 4 comments
Closed

Allow overwriting/extending of the 2FA logic #313

AlexWinder opened this issue Oct 6, 2020 · 4 comments
Assignees

Comments

@AlexWinder
Copy link

This is perhaps both a Jetstream and a Fortify request, but figured I should post it in here following on from Taylor's YouTube stream.

In Jetstream in it's current state you have the ability to overwrite the majority of the default installation features, they are published to app/Actions/Fortify/*, such as when a user is created it is put in CreateNewUser.php. Or when a user is deleted it is in app/Actions/Fortify/Jetstream/DeleteUser.php, allowing you to do other processes other than just removing a user from the system.

This is extremely useful for customising as per your requirements of your application, however there is no feature to allow for overwriting the 2FA. Let's say you want to throw an event to email a user when they add/remove their 2FA codes there is no simple or easy method to do so, not in the same way as has been done with things such as overwriting the new user.

@taylorotwell
Copy link
Member

When do you want to notify them? When 2FA is enabled or disabled? When new recovery codes are generated? We could add events for these things.

@AlexWinder
Copy link
Author

Ideally for when 2FA is enabled/disabled. The intention was mainly from a security POV so that if an account gets compromised users can be notified that they have had 2FA enabled/disabled on their account.

Realistically the recovery codes would only be generated when 2FA is enabled, wouldn't they? I didn't see the option to allow 2FA codes to be regenerated without first disabling it, so apologies if this is in there and I missed it.

@m1guelpf
Copy link
Contributor

m1guelpf commented Oct 8, 2020

This would be better solved by listening to some events instead of extracting the core logic I think

@taylorotwell
Copy link
Member

Would be solved using an event if someone wants to add it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants