Ensure createRegisterUrl()
calls are await
ed internally (#33650)
Closes #33645 Signed-off-by: Jon Koops <jonkoops@gmail.com>
This commit is contained in:
parent
284eeaefe4
commit
c3a74fa411
1 changed files with 6 additions and 6 deletions
|
@ -1329,8 +1329,8 @@ function Keycloak (config) {
|
|||
throw new Error("Logout failed, request returned an error code.");
|
||||
},
|
||||
|
||||
register: function(options) {
|
||||
window.location.assign(kc.createRegisterUrl(options));
|
||||
register: async function(options) {
|
||||
window.location.assign(await kc.createRegisterUrl(options));
|
||||
return createPromise().promise;
|
||||
},
|
||||
|
||||
|
@ -1486,9 +1486,9 @@ function Keycloak (config) {
|
|||
return promise.promise;
|
||||
},
|
||||
|
||||
register : function(options) {
|
||||
register : async function(options) {
|
||||
var promise = createPromise();
|
||||
var registerUrl = kc.createRegisterUrl();
|
||||
var registerUrl = await kc.createRegisterUrl();
|
||||
var cordovaOptions = createCordovaOptions(options);
|
||||
var ref = cordovaOpenWindowWrapper(registerUrl, '_blank', cordovaOptions);
|
||||
ref.addEventListener('loadstart', function(event) {
|
||||
|
@ -1555,9 +1555,9 @@ function Keycloak (config) {
|
|||
return promise.promise;
|
||||
},
|
||||
|
||||
register : function(options) {
|
||||
register : async function(options) {
|
||||
var promise = createPromise();
|
||||
var registerUrl = kc.createRegisterUrl(options);
|
||||
var registerUrl = await kc.createRegisterUrl(options);
|
||||
universalLinks.subscribe('keycloak' , function(event) {
|
||||
universalLinks.unsubscribe('keycloak');
|
||||
window.cordova.plugins.browsertab.close();
|
||||
|
|
Loading…
Reference in a new issue