【问题标题】:Msal.js 2.2 PKCE Authorization Flow Refresh Token MissingMsal.js 2.2 PKCE 授权流程刷新令牌丢失
【发布时间】:2020-09-23 15:05:18
【问题描述】:

我正在为 PKCE Authorization Code flow 使用 Msal.js 2.2 (@azure/msal-browser 2.2.0),存在 ID 和访问令牌,但没有刷新令牌。我错过了什么吗?

this.msalConfig = {
              auth: {
                clientId: this.clientid,
                authority: this.authority, //https://login.microsoftonline.com/{tenantid}
                navigateToLoginRequestUrl: true
              },
              cache: {
                cacheLocation: "sessionStorage",
                storeAuthStateInCookie: false,
              }
            };
            
    this.msalApp = new PublicClientApplication(this.msalConfig);

【问题讨论】:

  • 您好,您检查我的答案了吗?这个问题解决了吗?

标签: azure-active-directory msal.js


【解决方案1】:

尝试在scopes中设置offline_access

scopes: ["openid", "profile", "offline_access", "User.Read"]

【讨论】:

  • 如果我的回答对您有帮助,您可以接受它作为答案(单击答案旁边的复选标记,将其从灰色切换为已填充。)。见meta.stackexchange.com/questions/5234/…。这对其他社区成员可能是有益的。谢谢。
猜你喜欢
  • 2020-12-13
  • 2021-02-26
  • 2018-08-20
  • 1970-01-01
  • 2018-08-21
  • 2017-12-25
  • 1970-01-01
  • 1970-01-01
  • 2023-03-27
相关资源
最近更新 更多