We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e92d9cb commit 266947fCopy full SHA for 266947f
1 file changed
content/guides/basics-of-authentication.md
@@ -125,9 +125,15 @@ The scopes that were granted are returned as a part of the response from
125
exchanging a token.
126
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'
+ get '/callback' do
+ # ...
+ # 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
137
138
In our application, we're using `scopes.include?` to check if we were granted
139
the `user:email` scope needed for fetching the authenticated user's private
0 commit comments