Skip to content

Commit

Permalink
Merge pull request #1502 from bcgov/bugfix/alcs-1778
Browse files Browse the repository at this point in the history
fix login in portal
  • Loading branch information
urmikgov authored Mar 13, 2024
2 parents e386425 + 931f0a5 commit 7f1a4ff
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,12 @@ export class AuthenticationService {

async refreshTokens(redirect = true) {
if (this.refreshToken) {
if (this.expires && this.expires < Date.now()) {
if (this.refreshExpires && this.refreshExpires < Date.now()) {
if (redirect) {
await this.router.navigateByUrl('/login');
}
return;
}

const newTokens = await this.getNewTokens(this.refreshToken);
await this.setTokens(newTokens.token, newTokens.refresh_token);
}
Expand Down

0 comments on commit 7f1a4ff

Please sign in to comment.