Skip to content

Commit 0805765

Browse files
committed
fix: add limite verify-magic-link route if magicLinkDisabled
1 parent b4837fc commit 0805765

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Controllers/MagicLinkController.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,11 @@ protected function displayMessage(): string
145145
*/
146146
public function verify(): RedirectResponse
147147
{
148+
// Check if magic-link is not allowed
149+
if (! setting('Auth.allowMagicLinkLogins')) {
150+
return redirect()->route('login')->with('error', lang('Auth.magicLinkDisabled'));
151+
}
152+
148153
$token = $this->request->getGet('token');
149154

150155
/** @var UserIdentityModel $identityModel */

0 commit comments

Comments
 (0)