refactor: v2 access and refresh tokens (#20486)

* feat: add refreshTokenExpiresAt to /force-refresh, /exchange/, /refresh

* feat: encode ownerId, expiresAt in tokens & return refresh expires at when creating managed user

* driveby:fix: pass language when creating managed user

* refactor: remove void notation and await access token propagation

* refactor: centralize createOAuthTokens and refreshOAuthTokens logic

* docs: tokens expires at and payload

* chore: comment selectedDate in examples app booker
This commit is contained in:
Lauris Skraucis
2025-04-02 17:27:00 +03:00
committed by GitHub
parent b0a85a5637
commit e76bb37f78
13 changed files with 313 additions and 189 deletions
@@ -26,6 +26,10 @@ export class JwtService {
// divided by 1000 because iat (issued at time) is in seconds (not milliseconds) as informed by JWT specification
return Math.floor(Date.now() / 1000);
}
decode(token: string): Payload {
return this.nestJwtService.decode(token) as Payload;
}
}
type Payload = Record<string | number | symbol, any>;