enhance: allow extended refresh duration to PWAs
This commit is contained in:
parent
b1e949dce2
commit
916a6da4a0
6 changed files with 17 additions and 17 deletions
|
@ -8,9 +8,6 @@ import UserService from "../service/user/userService";
|
|||
import speakeasy from "speakeasy";
|
||||
import UnauthorizedRequestException from "../exceptions/unauthorizedRequestException";
|
||||
import RefreshService from "../service/refreshService";
|
||||
import UserPermissionService from "../service/user/userPermissionService";
|
||||
import PermissionHelper from "../helpers/permissionHelper";
|
||||
import RolePermissionService from "../service/user/rolePermissionService";
|
||||
|
||||
/**
|
||||
* @description Check authentication status by token
|
||||
|
@ -39,6 +36,7 @@ export async function login(req: Request, res: Response): Promise<any> {
|
|||
|
||||
let refreshCommand: CreateRefreshCommand = {
|
||||
userId: id,
|
||||
isFromPwa: req.isPWA,
|
||||
};
|
||||
let refreshToken = await RefreshCommandHandler.create(refreshCommand);
|
||||
|
||||
|
@ -83,6 +81,7 @@ export async function refresh(req: Request, res: Response): Promise<any> {
|
|||
|
||||
let refreshCommand: CreateRefreshCommand = {
|
||||
userId: tokenUserId,
|
||||
isFromPwa: req.isPWA,
|
||||
};
|
||||
let refreshToken = await RefreshCommandHandler.create(refreshCommand);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue