且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

一小时后,具有Azure AD B2C身份验证的Alexa技能将过期

更新时间:2023-12-05 22:45:04

我认为我有足够的信息至此继续回答我自己的问题。我发现, offline_access 范围对于令牌刷新是必需的。

I think that I have enough information at this point to go ahead and answer my own question. What I found was that the offline_access scope is necessary for Token Refresh to be possible.

每个Microsoft, offline_access范围使您的应用可以长时间代表用户访问资源。在同意页面上,该范围显示为保持对您授予其访问权限的数据的访问权限。当用户批准offline_access范围,您的应用可以从Microsoft身份平台令牌终结点接收刷新令牌。刷新令牌是长期存在的。随着旧令牌的过期,您的应用可以获取新的访问令牌。

Per Microsoft, "The offline_access scope gives your app access to resources on behalf of the user for an extended time. On the consent page, this scope appears as the "Maintain access to data you have given it access to" permission. When a user approves the offline_access scope, your app can receive refresh tokens from the Microsoft identity platform token endpoint. Refresh tokens are long-lived. Your app can get new access tokens as older ones expire.".

您可以详细了解此处

要解决此问题,我确保在AAD中可以使用此范围B2C,并将其添加为Alexa开发人员控制台中的引用范围。

To resolve the issue, I ensured that this scope was available in AAD B2C and added it as a referenced scope in the Alexa developer console.