Microsoft Teams Bot - 调试刷新令牌流
Microsoft Teams Bot - debug refresh token flow
在开发 Microsoft Teams Bot 时,我遇到了从未调用刷新令牌端点的问题。我相信这是我在配置上的错误,但我找不到任何细节到底出了什么问题。我做了什么:
- 在 Azure 端的 bot 设置中设置令牌交换 URL
- 将范围设置为
email offline_access
- 检查
refresh_token
已发出:
我看到 code
有问题:
{
"code": "[removed for security reasons]",
"grant_type": "authorization_code",
"redirect_uri": "https://token.botframework.com/.auth/web/redirect",
"client_id": "microsoft-teams-bot",
"client_secret": "[removed for security reasons]"
}
然后 refresh_token
由 code
:
发出
{
"scope": "email offline_access",
"token_type": "Bearer",
"access_token": "[removed for security reasons]",
"expires_in": 3600,
"refresh_token": "[removed for security reasons]"
}
但是refresh_token
之后再也没有用过。
任何想法可能是错误的?
问题是机器人配置错误。它使用刷新端点通过刷新令牌获取访问令牌(但我虽然它使用交换端点)。
在开发 Microsoft Teams Bot 时,我遇到了从未调用刷新令牌端点的问题。我相信这是我在配置上的错误,但我找不到任何细节到底出了什么问题。我做了什么:
- 在 Azure 端的 bot 设置中设置令牌交换 URL
- 将范围设置为
email offline_access
- 检查
refresh_token
已发出: 我看到code
有问题:
{
"code": "[removed for security reasons]",
"grant_type": "authorization_code",
"redirect_uri": "https://token.botframework.com/.auth/web/redirect",
"client_id": "microsoft-teams-bot",
"client_secret": "[removed for security reasons]"
}
然后 refresh_token
由 code
:
{
"scope": "email offline_access",
"token_type": "Bearer",
"access_token": "[removed for security reasons]",
"expires_in": 3600,
"refresh_token": "[removed for security reasons]"
}
但是refresh_token
之后再也没有用过。
任何想法可能是错误的?
问题是机器人配置错误。它使用刷新端点通过刷新令牌获取访问令牌(但我虽然它使用交换端点)。