Fix MakerWorld 2FA duplicate email loop and add email SMTP diagnostics

This commit is contained in:
2026-11-01 15:46:00 +01:00
parent 2d78d80934
commit 09285d0a46
12 changed files with 425 additions and 8 deletions
@@ -337,13 +337,13 @@ class MakerWorldController extends Controller
if ($result['status'] === '2fa_required') {
return redirect()
->route('admin.makerworld.index')
->route('admin.makerworld.index', ['tab' => 'auth'])
->with('warning', $result['message'])
->with('makerworld_2fa_account', $result['account']);
}
return redirect()
->route('admin.makerworld.index')
->route('admin.makerworld.index', ['tab' => 'auth'])
->with('error', $result['message']);
}
@@ -369,11 +369,28 @@ class MakerWorldController extends Controller
}
return redirect()
->route('admin.makerworld.index')
->route('admin.makerworld.index', ['tab' => 'auth'])
->with('error', $result['message'])
->with('makerworld_2fa_account', $validated['account']);
}
/**
* Resend verification code for 2FA manually on request.
*/
public function resendCode(Request $request): RedirectResponse
{
$validated = $request->validate([
'account' => 'required|string',
]);
$sent = $this->makerWorld->sendEmailVerificationCode($validated['account']);
return redirect()
->route('admin.makerworld.index', ['tab' => 'auth'])
->with($sent ? 'success' : 'error', $sent ? 'Er is een nieuwe verificatiecode verstuurd naar je e-mail.' : 'Kon verificatiecode niet opnieuw verzenden.')
->with('makerworld_2fa_account', $validated['account']);
}
/**
* Save MakerWorld session / bearer token directly.
*/