Email verification causes ALL forms to not work (Any info on internal email verification process helps)
If I sign up a new user with a fake gmail then try to log out, that works. (logging out also done by a form) but If I verify my email (using the default email verification functionality in laravel) a new tab opens, and in that new tab I can't use any forms. I can't log out, I can't comment, I CAN use links and do other stuff without any problem. clicking the submit button of forms, doesn't send a request. Doesn't reload the current page and doesn't redirect. No js errors no errors in logs, no errors nowhere. nothing.
Email verification leads user to a new tab, so they can close the old tab. The thing is everything works in the old tab. Same sessions and cookies in both tabs.
I guess this doesn't help, but here's the code used for email verification:
Route::get('/email/verify', function () {
return view('auth.verify-email');
})->middleware('auth')->name('verification.notice');
Route::post('/email/verification-notification', function (Request $request) {
$request->user()->sendEmailVerificationNotification();
return back()->with('message', 'Verification link sent!');
})->middleware(['auth', 'throttle:6,1'])->name('verification.send');
Route::get('/email/verify/{id}/{hash}', function (EmailVerificationRequest $request) {
$request->fulfill();
return redirect()->route('dashboard')->with('success', 'ایمیل با موفقیت تایید شد');
})->middleware(['auth', 'signed'])->name('verification.verify');
Also server restarts fix the problem for the users made before the restart.
I've been debugging this for hours, with and without ai. (Not surprisingly AI mostly mislead me to unrelated stuff)
Anything that relates email verification to csrf tokens, cookies, session, any variable that can be different in two tabs, helps.
Don't know what is this related to, so I put it in general
Please or to participate in this conversation.