give the auth modal a key and remove it before trying to open a new (it may already be opened in another state)

This commit is contained in:
Jacob Overgaard
2024-04-10 11:56:25 +02:00
parent e9873683f6
commit 78e9a0c8ce

View File

@@ -134,12 +134,14 @@ export class UmbAppAuthController extends UmbControllerBase {
// Show the provider selection screen
const modalManager = await this.getContext(UMB_MODAL_MANAGER_CONTEXT);
modalManager.remove('umbAuthModal');
const selected = await modalManager
.open(this._host, UMB_MODAL_APP_AUTH, {
data: {
userLoginState,
},
modal: {
key: 'umbAuthModal',
backdropBackground: this.#firstTimeLoggingIn
? 'var(--umb-auth-backdrop, url("/umbraco/backoffice/assets/umbraco_logo_white.svg") 20px 20px / 200px no-repeat, radial-gradient(circle, rgba(2,0,36,1) 0%, rgba(40,58,151,.9) 50%, rgba(0,212,255,1) 100%))'
: 'var(--umb-auth-backdrop-timedout, rgba(0,0,0,0.75))',