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

Commit

Permalink
feat(authService): ensure page reload after storage events
Browse files Browse the repository at this point in the history
  • Loading branch information
doktordirk committed Oct 11, 2016
1 parent b9ce956 commit 7125cc5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/authService.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,14 @@ export class AuthService {
this.authentication.responseAnalyzed = false;
this.updateAuthenticated();

if (this.config.storageChangedRedirect && wasAuthenticated !== this.authenticated) {
PLATFORM.location.assign(this.config.storageChangedRedirect);
if (wasAuthenticated === this.authenticated) {
return;
}

if (this.config.storageChangedRedirect) {
PLATFORM.location.href = this.config.storageChangedRedirect;
}
PLATFORM.location.reload();
}

/**
Expand Down

0 comments on commit 7125cc5

Please sign in to comment.