[英]Can't retrieve access_token, refresh_token from Omniauth authentication strategy with Devise, Rails 4
[英]Get the access_token and refresh_token using Azure AD with rails
我正在使用此身份验证OmniAuth Azure Active Directory ,我可以从我的应用程序登录和注销,但不会返回 access_token 和 refresh_token,因此我必须将这两个信息存储在我的数据库中。 当我尝试获取 access_token 和 refresh_token 时,rails 会返回以下信息:
有一个星期我正在尝试获取 access_token 和 refresh_token,但没有任何效果! 如果有人帮我解决这个问题,我会非常高兴!
请试试这个关于使用 Microsoft Graph 构建 Ruby on Rails 应用程序的示例。 在添加 Azure AD 身份验证的步骤中,您会注意到 OmniAuth 生成的哈希中有两个令牌: token
(访问令牌)和refresh_token
。
还有另一个使用 Azure AD v2.0 终结点的示例: 如何从桌面应用程序或脚本获取 Microsoft Graph OAuth2 访问令牌。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.