mirror of https://github.com/abpframework/abp.git
12 changed files with 22 additions and 29 deletions
@ -1,22 +1,21 @@ |
|||||
(function () { |
(function () { |
||||
|
|
||||
const sessionKey = 'authentication-session-id'; |
const stateKey = 'authentication-state-id'; |
||||
|
|
||||
window.addEventListener('storage', function (event) { |
window.addEventListener('storage', function (event) { |
||||
|
|
||||
console.log(event); |
if (event.key !== stateKey) { |
||||
if (event.key !== sessionKey) { |
|
||||
return; |
return; |
||||
} |
} |
||||
|
|
||||
var previousSessionId = event.oldValue |
var previousState = event.oldValue |
||||
var sessionId = event.newValue; |
var state = event.newValue; |
||||
|
|
||||
if(previousSessionId === sessionId) { |
if(previousState === state) { |
||||
return; |
return; |
||||
} |
} |
||||
|
|
||||
if(previousSessionId || !sessionId) { |
if(previousState || !state) { |
||||
abp.utils.removeOidcUser(); |
abp.utils.removeOidcUser(); |
||||
window.location.reload(); |
window.location.reload(); |
||||
return; |
return; |
||||
Loading…
Reference in new issue