File tree Expand file tree Collapse file tree
packages/server/api/src/app/authentication/context Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import { accessTokenManager } from './access-token-manager';
1515export async function getProjectAndToken (
1616 user : User ,
1717 tablesRefreshToken : string ,
18+ expiresInSeconds ?: number ,
1819) : Promise < {
1920 user : User ;
2021 project : Project ;
@@ -38,15 +39,18 @@ export async function getProjectAndToken(
3839 project . organizationId ,
3940 ) ;
4041
41- const token = await accessTokenManager . generateToken ( {
42- id : user . id ,
43- externalId : user . externalId ,
44- type : PrincipalType . USER ,
45- projectId : project . id ,
46- organization : {
47- id : organization . id ,
42+ const token = await accessTokenManager . generateToken (
43+ {
44+ id : user . id ,
45+ externalId : user . externalId ,
46+ type : PrincipalType . USER ,
47+ projectId : project . id ,
48+ organization : {
49+ id : organization . id ,
50+ } ,
4851 } ,
49- } ) ;
52+ expiresInSeconds ,
53+ ) ;
5054
5155 return {
5256 user : updatedUser ,
You can’t perform that action at this time.
0 commit comments