Token login
This commit is contained in:
parent
35657a7bbd
commit
8dcb4be8a8
11 changed files with 94 additions and 26 deletions
|
@ -36,7 +36,7 @@ const Login = () => {
|
|||
username: data.get('email'),
|
||||
password: data.get('password'),
|
||||
}
|
||||
const token = await api.userAuth("http://localhost:2586"/*window.location.origin*/, user);
|
||||
const token = await api.login("http://localhost:2586"/*window.location.origin*/, user);
|
||||
console.log(`[Api] User auth for user ${user.username} successful, token is ${token}`);
|
||||
session.store(user.username, token);
|
||||
window.location.href = routes.app;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue