fix: auth redirects and routing context issues
This commit is contained in:
@@ -45,7 +45,7 @@ const handleSubmit = async () => {
|
||||
|
||||
if (res.ok) {
|
||||
await syncUser()
|
||||
await router.push('/dashboard')
|
||||
await router.push('/me')
|
||||
}
|
||||
} catch (error: any) {
|
||||
errorMessage.value = error.data?.message || 'Errore. Verifica la password attuale.'
|
||||
|
||||
@@ -41,7 +41,6 @@ const handleVerifyOtp = async () => {
|
||||
try {
|
||||
const res = await verifyOtp({ email: email.value, code: otpCode.value })
|
||||
await handleLoginSuccess(res.token)
|
||||
router.push('/dashboard')
|
||||
} catch (err: any) {
|
||||
errorMessage.value = 'Codice OTP non valido o scaduto.'
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user