Skip to content
This repository was archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
fix(authService): storageEventHandler change
Browse files Browse the repository at this point in the history
  • Loading branch information
Benajmin Bondi committed Mar 23, 2017
1 parent 573fb8f commit 01d3662
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/authService.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,16 @@ export class AuthService {
return;
}

// in case auto refresh tokens are enabled
if(this.config.autoUpdateToken
&& this.authentication.getAccessToken()
&& this.authentication.getRefreshToken())
{
// we just need to check the status of the updated token we have in storage
this.authentication.updateAuthenticated();
return;
}

logger.info('Stored token changed event');

// IE runs the event handler before updating the storage value. Update it now.
Expand Down

0 comments on commit 01d3662

Please sign in to comment.