mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
jwt thoughts and fixes
This commit is contained in:
parent
fd54febd24
commit
81afd9d78f
@ -51,7 +51,12 @@ export class UserResolver {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// create and return the json web token
|
// create and return the json web token
|
||||||
return jwt.sign({ result }, CONFIG.JWT_SECRET, { expiresIn: CONFIG.JWT_EXPIRES_IN })
|
// The expire doesn't help us here. The client needs to track when the token expires on its own,
|
||||||
|
// since every action prolongs the time the session is valid.
|
||||||
|
return jwt.sign(
|
||||||
|
{ result, role: 'todo' },
|
||||||
|
CONFIG.JWT_SECRET /* , { expiresIn: CONFIG.JWT_EXPIRES_IN } */,
|
||||||
|
)
|
||||||
// return (await apiPost(CONFIG.LOGIN_API_URL + 'unsecureLogin', login)).result.data
|
// return (await apiPost(CONFIG.LOGIN_API_URL + 'unsecureLogin', login)).result.data
|
||||||
// const loginResult: LoginResult = await loginAPI.login(data)
|
// const loginResult: LoginResult = await loginAPI.login(data)
|
||||||
// return loginResult.user ? loginResult.user : new User()
|
// return loginResult.user ? loginResult.user : new User()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user