Skip to content

Commit 712fe7f

Browse files
authored
Merge pull request #2509 from asfadmin/fix-login-expire
Use cmr expiration instead of ASF
2 parents 9b72b05 + 6c78fe6 commit 712fe7f

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/app/services/auth.service.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,11 @@ export class AuthService {
191191
id: string,
192192
groups: models.URSGroup[],
193193
token: string,
194-
exp: number,
194+
_exp: number,
195195
): models.UserAuth {
196-
return { id, token, groups, exp };
196+
const cmr_content = JSON.parse(
197+
Buffer.from(token.split('.')[1], 'base64').toString(),
198+
);
199+
return { id, token, groups, exp: cmr_content.exp };
197200
}
198201
}

0 commit comments

Comments
 (0)