Fix MakerWorld 2FA duplicate email loop and add email SMTP diagnostics
This commit is contained in:
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user