@@ -296,7 +296,7 @@ Please checkout that you are using OIDC hook inside a <OidcProvider configuratio
296
296
) ;
297
297
}
298
298
299
- loginPromise : Promise < void > = null ;
299
+ loginPromise : Promise < unknown > = null ;
300
300
async loginAsync (
301
301
callbackPath : string = undefined ,
302
302
extras : StringMap = null ,
@@ -312,21 +312,22 @@ Please checkout that you are using OIDC hook inside a <OidcProvider configuratio
312
312
return this . loginPromise ;
313
313
}
314
314
if ( silentLoginOnly ) {
315
- return defaultSilentLoginAsync (
315
+ this . loginPromise = defaultSilentLoginAsync (
316
316
window ,
317
317
this . configurationName ,
318
318
this . configuration ,
319
319
this . publishEvent . bind ( this ) ,
320
320
this ,
321
321
) ( extras , scope ) ;
322
+ } else {
323
+ this . loginPromise = defaultLoginAsync (
324
+ this . configurationName ,
325
+ this . configuration ,
326
+ this . publishEvent . bind ( this ) ,
327
+ this . initAsync . bind ( this ) ,
328
+ this . location ,
329
+ ) ( callbackPath , extras , isSilentSignin , scope ) ;
322
330
}
323
- this . loginPromise = defaultLoginAsync (
324
- this . configurationName ,
325
- this . configuration ,
326
- this . publishEvent . bind ( this ) ,
327
- this . initAsync . bind ( this ) ,
328
- this . location ,
329
- ) ( callbackPath , extras , isSilentSignin , scope ) ;
330
331
return this . loginPromise . finally ( ( ) => {
331
332
this . loginPromise = null ;
332
333
} ) ;
0 commit comments