Skip to content

Commit

Permalink
Merge 6d23763 into 4e3902f
Browse files Browse the repository at this point in the history
  • Loading branch information
bitkidd committed Dec 28, 2018
2 parents 4e3902f + 6d23763 commit 20b14c5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
<a name="2.1.3"></a>
## [2.1.3](https://github.com/adonisjs/adonis-ally/compare/v2.1.2...v2.1.3) (2018-12-28)


### Bug Fixes

* **google:** updated driver because of Google+ API [shutdown](https://developers.google.com/+/api-shutdown)

<a name="2.1.2"></a>
## [2.1.2](https://github.com/adonisjs/adonis-ally/compare/v2.1.1...v2.1.2) (2018-10-15)

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@adonisjs/ally",
"version": "2.1.2",
"version": "2.1.3",
"description": "Social authenticator for AdonisJs Framework",
"main": "index.js",
"files": [
Expand Down
12 changes: 6 additions & 6 deletions src/Drivers/Google.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class Google extends OAuth2Scheme {
* @private
*/
async _getUserProfile (accessToken) {
const profileUrl = 'https://www.googleapis.com/plus/v1/people/me'
const profileUrl = 'https://www.googleapis.com/oauth2/v3/userinfo'

const response = await got(profileUrl, {
headers: {
Expand Down Expand Up @@ -156,11 +156,11 @@ class Google extends OAuth2Scheme {

user.setOriginal(userProfile)
.setFields(
userProfile.id,
userProfile.displayName,
_.get(userProfile, 'emails.0.value'),
userProfile.displayName,
_.get(userProfile, 'image.url')
userProfile.sub,
userProfile.name,
userProfile.email,
userProfile.name,
userProfile.picture
)
.setToken(
accessTokenResponse.accessToken,
Expand Down

0 comments on commit 20b14c5

Please sign in to comment.