auto login after register

This commit is contained in:
2025-12-28 20:13:24 +05:30
parent 86101a1b1c
commit 99c2477ae8

View File

@@ -53,6 +53,7 @@ export function AuthProvider({
setError(null); setError(null);
await auth.post("/register", { username, password }); await auth.post("/register", { username, password });
await login(username, password);
} catch (e: any) { } catch (e: any) {
setError(e.response?.data?.detail ?? "Registration failed"); setError(e.response?.data?.detail ?? "Registration failed");
} finally { } finally {