processInit should return a promise for setupCheckLoginIframe and should only call processCallback if that setupCheckLoginIframe is successful
This commit is contained in:
parent
b4532ec629
commit
ca324c29e8
1 changed files with 6 additions and 4 deletions
|
@ -159,10 +159,12 @@
|
|||
var callback = parseCallback(window.location.href);
|
||||
|
||||
if (callback) {
|
||||
setupCheckLoginIframe();
|
||||
window.history.replaceState({}, null, callback.newUrl);
|
||||
processCallback(callback, initPromise);
|
||||
return;
|
||||
return setupCheckLoginIframe().success(function() {
|
||||
window.history.replaceState({}, null, callback.newUrl);
|
||||
processCallback(callback, initPromise);
|
||||
}).error(function (e) {
|
||||
throw 'Could not initialize iframe';
|
||||
});
|
||||
} else if (initOptions) {
|
||||
if (initOptions.token && initOptions.refreshToken) {
|
||||
setToken(initOptions.token, initOptions.refreshToken, initOptions.idToken);
|
||||
|
|
Loading…
Reference in a new issue