auto login after register
This commit is contained in:
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user