Skip to content

Commit

Permalink
make session last 12 hours
Browse files Browse the repository at this point in the history
  • Loading branch information
JeromeBu committed Nov 6, 2024
1 parent 5836171 commit 26d28c0
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export class AuthenticateWithInclusionCode extends TransactionalUseCase<
{ code, page }: WithSourcePage & { code: OAuthCode },
existingOngoingOAuth: OngoingOAuth,
): Promise<ConnectedRedirectUrl> {
const { accessToken, expire, payload, idToken } =
const { accessToken, payload, idToken } =
await this.#inclusionConnectGateway.getAccessToken(
{
code,
Expand Down Expand Up @@ -170,12 +170,14 @@ export class AuthenticateWithInclusionCode extends TransactionalUseCase<
}),
);

const twelveHoursInSeconds = 12 * 60 * 60;

const token = this.#generateAuthenticatedUserJwt(
{
userId: newOrUpdatedAuthenticatedUser.id,
version: currentJwtVersions.inclusion,
},
expire * 60,
twelveHoursInSeconds,
);

return `${this.#immersionFacileBaseUrl}/${
Expand Down

0 comments on commit 26d28c0

Please sign in to comment.