generated from spatie/package-skeleton-laravel
-
Notifications
You must be signed in to change notification settings - Fork 138
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
Impersonation, SSO / bypass for specific users #367
Comments
I'd love to see that too. Ideally, something like this BreezyCore::make()
->enableTwoFactorAuthentication(
force: true,
excludedDrivers: ['github', 'saml2'],
impersonationByPass: true,
) to chose which Socialite drivers you want to exclude. But obviously a simple closure returning a boolean value that is then checked for each user would be just as good like BreezyCore::make()
->enableTwoFactorAuthentication(
force: true,
bypass: fn (User $user): bool => $user->id === 1,
) or simply allow a closure or boolean for the force parameter: BreezyCore::make()
->enableTwoFactorAuthentication(
force: fn (User $user): bool => $user->id === 1,
) That'd be awesome. @phpsa did you work on that already? |
Submitted a PR for this: #409 |
You can then do BreezyCore::make()
->enableTwoFactorAuthentication(
force: fn (): bool => auth()->user()->id === 1,
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
would you accept a pull request that will extend the functionality to allow programatic choice on whether a user should be forced to 2fa?
The text was updated successfully, but these errors were encountered: