DONE: replace email verification by link instead of otp
This commit is contained in:
@@ -57,9 +57,9 @@ class FortifyServiceProvider extends ServiceProvider
|
||||
});
|
||||
|
||||
RateLimiter::for('email-verification', function (Request $request) {
|
||||
$throttleKey = Str::transliterate(Str::lower($request->input('email', '')).'|'.$request->ip());
|
||||
$throttleKey = Str::transliterate($request->route('id', '').'|'.$request->ip());
|
||||
|
||||
return Limit::perMinute(5)->by($throttleKey);
|
||||
return Limit::perMinute(6)->by($throttleKey);
|
||||
});
|
||||
|
||||
RateLimiter::for('email-verification-resend', function (Request $request) {
|
||||
@@ -87,10 +87,6 @@ class FortifyServiceProvider extends ServiceProvider
|
||||
$shouldBypassPassword = config('app.env', 'local');
|
||||
|
||||
if ($user && ($shouldBypassPassword || Hash::check($request->password, $user->password))) {
|
||||
if (! $user->hasVerifiedEmail()) {
|
||||
return $user;
|
||||
}
|
||||
|
||||
if (! $user->canAuthenticate()) {
|
||||
throw ValidationException::withMessages([
|
||||
'email' => [$user->getLoginRestrictionMessage()],
|
||||
|
||||
Reference in New Issue
Block a user