extended the exprire duration for jwt token
This commit is contained in:
parent
67a9bd2520
commit
d35b3ff5be
@ -6,7 +6,7 @@ import {TokenInterface} from "../Controller/AuthenticateController";
|
|||||||
class JWTTokenManager {
|
class JWTTokenManager {
|
||||||
|
|
||||||
public createJWTToken(userUuid: string) {
|
public createJWTToken(userUuid: string) {
|
||||||
return Jwt.sign({userUuid: userUuid}, SECRET_KEY, {expiresIn: '24h'});
|
return Jwt.sign({userUuid: userUuid}, SECRET_KEY, {expiresIn: '200d'}); //todo: add a mechanic to refresh or recreate token
|
||||||
}
|
}
|
||||||
|
|
||||||
public async getUserUuidFromToken(token: unknown): Promise<string> {
|
public async getUserUuidFromToken(token: unknown): Promise<string> {
|
||||||
|
Loading…
Reference in New Issue
Block a user