mirror of
https://github.com/R0m1k3/Regisflow.git
synced 2026-10-11 17:29:48 +02:00
Ensure users are properly redirected after successfully logging in
Fix: Handle response data from login API to correctly set user context. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 91318273-c764-4fd4-be04-bdc12c38af32 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/0715008c-7244-40f4-befc-26c014852236/ab880d72-1a34-4d36-b5be-9f44df85ed1a.jpg
This commit is contained in:
1 parent
5c01234fc4
commit
b1835987f9
1 file changed
+2
-1
@@ -37,7 +37,8 @@ export function useAuth() {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(credentials)
|
||||
});
|
||||
return response.json();
|
||||
const data = await response.json();
|
||||
return data;
|
||||
},
|
||||
onSuccess: (data) => {
|
||||
setUser(data.user);
|
||||
|
||||
Reference in new issue
Block a user