File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -125,9 +125,15 @@ The scopes that were granted are returned as a part of the response from
125
125
exchanging a token.
126
126
127
127
#!ruby
128
- # check if we were granted user:email scope
129
- scopes = JSON.parse(result)['scope'].split(',')
130
- has_user_email_scope = scopes.include? 'user:email'
128
+ get '/callback' do
129
+ # ...
130
+ # Get the access_token using the code sample above
131
+ # ...
132
+
133
+ # check if we were granted user:email scope
134
+ scopes = JSON.parse(result)['scope'].split(',')
135
+ has_user_email_scope = scopes.include? 'user:email'
136
+ end
131
137
132
138
In our application, we're using ` scopes.include? ` to check if we were granted
133
139
the ` user:email ` scope needed for fetching the authenticated user's private
You can’t perform that action at this time.
0 commit comments