首页 > 解决方案 > Msal登录弹窗的定位

问题描述

我目前正在使用 msal-angular 的登录弹出窗口登录 Angular 应用程序的 Microsoft Office 帐户。但是,当弹出窗口出现时,它出现在屏幕的左上角,一半的窗口离开屏幕。因此,我必须手动调整它的大小以使其完全显示在屏幕上。

有没有办法改变这个弹出窗口的位置以出现在某个位置?例如,在从中调用它的浏览器窗口的中间?

我当前的弹出呼叫:

async signIn(): Promise<void> {
    const result = await this.msalService.loginPopup(OAuthSettings.scopes)
      .catch((reason) => {
        console.log('Login failed', JSON.stringify(reason, null, 2));
    });

    if (result) {
      this.authenticated = true;
    }
}

标签: angulartypescriptpopupmsal

解决方案


推荐阅读