Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

OukaMiyuki's avatar

Multi guard causing ERR_TOO_MANY_REDIRECT on email verification Laravel

Hi, so I'm trying to create a login register with Laravel Breeze using multiple guards and multiple login forms. However, when I'm trying to implement email verification, I always get ERR_TOO_MANY_REDIRECT when it's redirected to verification.notice route. I wonder why this is happening, and if there is any solution for this? Thank you, I really appreciate for an answer because I've been trying for hours looking for a solution.

0 likes
5 replies
gych's avatar

Its because something is causing a redirect loop, resulting in too many redirects as the error states.

Snapey's avatar

If you redirect in middleware make sure you are not redirecting to a route protected by middleware that also redirects.

1 like
martinbean's avatar

@oukamiyuki This is one of the reasons you should use roles instead of multiple guards. As soon as you introduce multiple guards, you just get conflicts and bugs like this.

1 like
OukaMiyuki's avatar

I see, thank you for the answer, I've managed to fix the bug by creating different routes and controller for each guard, it's a little bit troublesome yes, but I can finally fix the problem

MtDalPizzol's avatar

You need to check where are you actually authenticating the user. Usually you will find something like this, which uses the default web guard:

Auth::attempt($request->only('email', 'password')

You need to specify the guard like this:

Auth::guard('customguard')->attempt($request->only('email', 'password')

Please or to participate in this conversation.