Laravel API Rest + Breeze + Email verification

255 Views Asked by At

I'm creating a website with Laravel on the backend, using Breeze for authentication, and React on the frontend. Breeze automatically created an "APP_FRONTEND_URL" variable in the .env file, which it uses in its routes.

I haven't customized any Breeze routes yet, and everything is working quite well. I have only one issue regarding email verification. It seems that Breeze, when used as an API, requires session cookies or a token for this verification. In other words, when I receive the verification email:

If I open it in the same browser from which I registered, it works. If I open it in another browser, the email verification doesn't work. Ideally, I'd like the user to be able to open the validation email from any tool or browser. Do you know how to achieve this?

I've tried several things, including modifying the "Illuminate/Foundation/Auth/EmailVerificationRequest.php" file in the "authorize" method, but either I did it wrong or it didn't work.

I would appreciate your ideas.

0

There are 0 best solutions below