Skip to content

Commit

Permalink
done project
Browse files Browse the repository at this point in the history
  • Loading branch information
snychka committed May 25, 2020
1 parent d712648 commit b2e2555
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions client.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,13 @@ app.get('/callback', (req, res) => {
url: config.tokenEndpoint,
auth: {username: config.clientId, password: config.clientSecret},
data: {code: req.query.code}
}).then(res => {
}).then(response => {
return axios({
method: 'GET',
url: config.userInfoEndpoint,
headers: {authorization: "bear " +response.data.access_token}
}).then(res => {
headers: {authorization: "bearer " +response.data.access_token}
}).then(response => {
res.render("welcome", {user: response.data});
});

});
Expand Down

0 comments on commit b2e2555

Please sign in to comment.