简体   繁体   中英

Get the access_token and refresh_token using Azure AD with rails

I'm using this authetition OmniAuth Azure Active Directory , I can login and logout from my application, but is not returning me a access_token and refresh_token and is necessary that I store this two information on my DB. When I try to get the access_token and refresh_token, rails return me this information:

在此处输入图片说明

There is one week that i'm trying to get the access_token and refresh_token, but nothing is working! I'll be really greatful if someone help me to solve this problem!

Please try this sample about building Ruby on Rails apps with Microsoft Graph. In the step of adding Azure AD authentication , you'll notice there are two tokens in the hash generated by OmniAuth: token (access token) and refresh_token .

There is another example using Azure AD v2.0 Endpoint: how to get a Microsoft Graph OAuth2 access token from a desktop application or script.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM