8000 Merge pull request #829 from github/update-1438090836 · Git-Beadup/developer.github.com@aa973bb · GitHub
[go: up one dir, main page]

Skip to content

Commit aa973bb

Browse files
committed
Merge pull request github#829 from github/update-1438090836
2 parents e92d9cb + 266947f commit aa973bb

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

content/guides/basics-of-authentication.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,15 @@ The scopes that were granted are returned as a part of the response from
125125
exchanging a token.
126126

127127
#!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
131137

132138
In our application, we're using `scopes.include?` to check if we were granted
133139
the `user:email` scope needed for fetching the authenticated user's private

0 commit comments

Comments
 (0)
0