Skip to content

Commit e58bff5

Browse files
committed
#195 userProfileURL for Google Strategy: main app, boilerplate app
1 parent 463c0ea commit e58bff5

File tree

6 files changed

+8
-50
lines changed

6 files changed

+8
-50
lines changed

boilerplate/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
},
1212
"dependencies": {
1313
"@material-ui/core": "3.2.2",
14-
"@passport-next/passport-google-oauth2": "^1.0.0",
1514
"connect-mongo": "2.0.1",
1615
"dotenv": "6.1.0",
1716
"express": "4.16.4",

boilerplate/server/google.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const passport = require('passport');
2-
const GoogleStrategy = require('@passport-next/passport-google-oauth2').Strategy;
2+
const Strategy = require('passport-google-oauth').OAuth2Strategy;
33
const User = require('./models/User');
44

55
function auth({ ROOT_URL, server }) {
@@ -30,11 +30,12 @@ function auth({ ROOT_URL, server }) {
3030
}
3131
};
3232
passport.use(
33-
new GoogleStrategy(
33+
new Strategy(
3434
{
3535
clientID: process.env.Google_clientID,
3636
clientSecret: process.env.Google_clientSecret,
3737
callbackURL: `${ROOT_URL}/oauth2callback`,
38+
userProfileURL: 'https://www.googleapis.com/oauth2/v3/userinfo',
3839
},
3940
verify,
4041
),

boilerplate/yarn.lock

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -761,27 +761,6 @@
761761
recompose "0.28.0 - 0.30.0"
762762
warning "^4.0.1"
763763

764-
"@passport-next/passport-google-oauth2@^1.0.0":
765-
version "1.0.0"
766-
resolved "https://registry.yarnpkg.com/@passport-next/passport-google-oauth2/-/passport-google-oauth2-1.0.0.tgz#cadef72d9ef42d549a5578eab338febdf234f806"
767-
integrity sha512-rbAtK0eGgjQhT/MqMSuN7Mxy4XTr1/LINk5rYPVezP3MfkVYuK20V0XW9fg1ikFMvyxSdmfLTyYduud7SfFSqw==
768-
dependencies:
769-
"@passport-next/passport-oauth2" "1.7.x"
770-
771-
"@passport-next/[email protected]":
772-
version "1.7.0"
773-
resolved "https://registry.yarnpkg.com/@passport-next/passport-oauth2/-/passport-oauth2-1.7.0.tgz#48ef05df2a7980e888350a824e706ec177a40d93"
774-
integrity sha512-0905TcHFwvqPyMsqTKDwjwddPJJcWkUs4fjbUNgnnxkfQ0/LX4FVwuMywOXiFNY12hhX92j8F5srGQC4f9UWug==
775-
dependencies:
776-
"@passport-next/passport-strategy" "1.1.x"
777-
lodash ">=4.17.5"
778-
oauth "0.9.x"
779-
780-
"@passport-next/[email protected]":
781-
version "1.1.0"
782-
resolved "https://registry.yarnpkg.com/@passport-next/passport-strategy/-/passport-strategy-1.1.0.tgz#4c0df069e2ec9262791b9ef1e23320c1d73bdb74"
783-
integrity sha512-2KhFjtPueJG6xVj2HnqXt9BlANOfYCVLyu+pXYjPGBDT8yk+vQwc/6tsceIj+mayKcoxMau2JimggXRPHgoc8w==
784-
785764
"@types/jss@^9.5.6":
786765
version "9.5.7"
787766
resolved "https://registry.yarnpkg.com/@types/jss/-/jss-9.5.7.tgz#fa57a6d0b38a3abef8a425e3eb6a53495cb9d5a0"
@@ -3974,7 +3953,7 @@ [email protected]:
39743953
resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99"
39753954
integrity sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=
39763955

3977-
[email protected], lodash@>=4.17.5, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.4, lodash@^4.17.5:
3956+
[email protected], lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.4, lodash@^4.17.5:
39783957
version "4.17.11"
39793958
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d"
39803959
integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
"dependencies": {
2020
"@material-ui/core": "3.9.1",
2121
"@octokit/rest": "15.15.1",
22-
"@passport-next/passport-google-oauth2": "^1.0.0",
2322
"aws-sdk": "2.339.0",
2423
"compression": "1.7.3",
2524
"connect-mongo": "2.0.1",

server/google.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const passport = require('passport');
2-
const GoogleStrategy = require('@passport-next/passport-google-oauth2').Strategy;
2+
const Strategy = require('passport-google-oauth').OAuth2Strategy;
33
const User = require('./models/User');
44

55
function auth({ ROOT_URL, server }) {
@@ -30,11 +30,12 @@ function auth({ ROOT_URL, server }) {
3030
}
3131
};
3232
passport.use(
33-
new GoogleStrategy(
33+
new Strategy(
3434
{
3535
clientID: process.env.Google_clientID,
3636
clientSecret: process.env.Google_clientSecret,
3737
callbackURL: `${ROOT_URL}/oauth2callback`,
38+
userProfileURL: 'https://www.googleapis.com/oauth2/v3/userinfo',
3839
},
3940
verify,
4041
),

yarn.lock

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -789,27 +789,6 @@
789789
universal-user-agent "^2.0.0"
790790
url-template "^2.0.8"
791791

792-
"@passport-next/passport-google-oauth2@^1.0.0":
793-
version "1.0.0"
794-
resolved "https://registry.yarnpkg.com/@passport-next/passport-google-oauth2/-/passport-google-oauth2-1.0.0.tgz#cadef72d9ef42d549a5578eab338febdf234f806"
795-
integrity sha512-rbAtK0eGgjQhT/MqMSuN7Mxy4XTr1/LINk5rYPVezP3MfkVYuK20V0XW9fg1ikFMvyxSdmfLTyYduud7SfFSqw==
796-
dependencies:
797-
"@passport-next/passport-oauth2" "1.7.x"
798-
799-
"@passport-next/[email protected]":
800-
version "1.7.0"
801-
resolved "https://registry.yarnpkg.com/@passport-next/passport-oauth2/-/passport-oauth2-1.7.0.tgz#48ef05df2a7980e888350a824e706ec177a40d93"
802-
integrity sha512-0905TcHFwvqPyMsqTKDwjwddPJJcWkUs4fjbUNgnnxkfQ0/LX4FVwuMywOXiFNY12hhX92j8F5srGQC4f9UWug==
803-
dependencies:
804-
"@passport-next/passport-strategy" "1.1.x"
805-
lodash ">=4.17.5"
806-
oauth "0.9.x"
807-
808-
"@passport-next/[email protected]":
809-
version "1.1.0"
810-
resolved "https://registry.yarnpkg.com/@passport-next/passport-strategy/-/passport-strategy-1.1.0.tgz#4c0df069e2ec9262791b9ef1e23320c1d73bdb74"
811-
integrity sha512-2KhFjtPueJG6xVj2HnqXt9BlANOfYCVLyu+pXYjPGBDT8yk+vQwc/6tsceIj+mayKcoxMau2JimggXRPHgoc8w==
812-
813792
"@types/jss@^9.5.6":
814793
version "9.5.7"
815794
resolved "https://registry.yarnpkg.com/@types/jss/-/jss-9.5.7.tgz#fa57a6d0b38a3abef8a425e3eb6a53495cb9d5a0"
@@ -5464,7 +5443,7 @@ lodash.sortby@^4.7.0:
54645443
resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438"
54655444
integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=
54665445

5467-
[email protected], lodash@>=4.17.5, lodash@^4.13.1, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.4, lodash@^4.17.5:
5446+
[email protected], lodash@^4.13.1, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.4, lodash@^4.17.5:
54685447
version "4.17.11"
54695448
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d"
54705449
integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==

0 commit comments

Comments
 (0)