FIX: Remove the last auth result after authenticating
This commit is contained in:
parent
c626558d36
commit
2cfb0d60a8
|
@ -4,6 +4,7 @@ export default {
|
||||||
initialize() {
|
initialize() {
|
||||||
if (window.location.search.indexOf('authComplete=true') !== -1) {
|
if (window.location.search.indexOf('authComplete=true') !== -1) {
|
||||||
const lastAuthResult = localStorage.getItem('lastAuthResult');
|
const lastAuthResult = localStorage.getItem('lastAuthResult');
|
||||||
|
localStorage.removeItem('lastAuthResult');
|
||||||
if (lastAuthResult) {
|
if (lastAuthResult) {
|
||||||
Ember.run.next(() => Discourse.authenticationComplete(JSON.parse(lastAuthResult)));
|
Ember.run.next(() => Discourse.authenticationComplete(JSON.parse(lastAuthResult)));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue