Fix token key mismatch in verify functions
All checks were successful
Build frontend / build (push) Successful in 40s

AuthService stores token as 'auth_token', but verifyEmail/verifyPhone
were reading 'token'. Now uses AuthService.getToken() consistently.
This commit is contained in:
Claw AI
2026-03-28 16:31:27 +00:00
parent 5a4b018c07
commit de7636f852

View File

@ -268,13 +268,13 @@ export async function sendPhoneOTP() {
export async function verifyEmail(code) {
console.log('[Auth] Verifying email with code:', code);
const token = typeof window !== 'undefined' ? localStorage.getItem('token') : null;
const token = AuthService.getToken();
return authFetch(`/Auth/VerifyEmail?code=${encodeURIComponent(code)}`, {}, token);
}
export async function verifyPhone(code) {
console.log('[Auth] Verifying phone with code:', code);
const token = typeof window !== 'undefined' ? localStorage.getItem('token') : null;
const token = AuthService.getToken();
return authFetch(`/Auth/VerifyPhoneNumber?code=${encodeURIComponent(code)}`, {}, token);
}