File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -6,19 +6,20 @@ class MicrosoftGraph < OmniAuth::Strategies::OAuth2
66 option :name , :microsoft_graph
77
88 option :client_options , {
9- site : 'https://login.microsoftonline.com/common/oauth2/authorize ' ,
10- token_url : 'https://login.microsoftonline.com/ common/oauth2/token' ,
11- authorize_url : 'https://login.microsoftonline.com/ common/oauth2/authorize'
9+ site : 'https://login.microsoftonline.com/' ,
10+ token_url : 'common/oauth2/v2.0 /token' ,
11+ authorize_url : 'common/oauth2/v2.0 /authorize'
1212 }
1313
1414 option :authorize_params , {
15- resource : 'https://graph.microsoft.com/'
1615 }
1716
1817 option :token_params , {
1918 resource : 'https://graph.microsoft.com/'
2019 }
2120
21+ option :scope , "https://graph.microsoft.com/profile https://graph.microsoft.com/email https://graph.microsoft.com/User.Read https://graph.microsoft.com/User.ReadBasic.All"
22+
2223 uid { raw_info [ "id" ] }
2324
2425 info do
@@ -39,7 +40,7 @@ class MicrosoftGraph < OmniAuth::Strategies::OAuth2
3940 end
4041
4142 def raw_info
42- @raw_info ||= access_token . get ( authorize_params . resource + 'v1.0/me' ) . parsed
43+ @raw_info ||= access_token . get ( token_params . resource + 'v1.0/me' ) . parsed
4344 end
4445 end
4546 end
You can’t perform that action at this time.
0 commit comments