diff --git a/apps/meteor/package.json b/apps/meteor/package.json index 33f6b8f6334a1..afd3c5ac512e8 100644 --- a/apps/meteor/package.json +++ b/apps/meteor/package.json @@ -266,6 +266,7 @@ "passport-facebook": "^3.0.0", "passport-facebook2": "^1.0.3", "passport-github2": "^0.1.12", + "passport-google-oauth20": "^2.0.0", "path": "^0.12.7", "path-to-regexp": "^6.3.0", "pino": "10.3.1", @@ -395,6 +396,7 @@ "@types/passport": "^1.0.17", "@types/passport-facebook": "^3.0.4", "@types/passport-github2": "^1.2.9", + "@types/passport-google-oauth20": "^2", "@types/prometheus-gc-stats": "^0.6.4", "@types/proxy-from-env": "^1.0.4", "@types/proxyquire": "^1.3.31", diff --git a/apps/meteor/server/lib/oauth/oauthConfigs.ts b/apps/meteor/server/lib/oauth/oauthConfigs.ts index eb02d955f044c..55b2c607cbdcd 100644 --- a/apps/meteor/server/lib/oauth/oauthConfigs.ts +++ b/apps/meteor/server/lib/oauth/oauthConfigs.ts @@ -1,6 +1,7 @@ import type { Strategy } from 'passport'; import { Strategy as FacebookStrategy } from 'passport-facebook'; import { Strategy as GitHubStrategy } from 'passport-github2'; +import { Strategy as GoogleStrategy } from 'passport-google-oauth20'; export type OAuthConfig = { strategy: new (...args: any[]) => Strategy; @@ -16,6 +17,10 @@ export const OAuthConfigs: Record = { strategy: FacebookStrategy, scope: ['email'], }, + google: { + strategy: GoogleStrategy, + scope: ['email', 'profile'], + }, } as const; export type Provider = keyof typeof OAuthConfigs; diff --git a/yarn.lock b/yarn.lock index b3e3f7711f0dc..4cfed891e35bf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9956,6 +9956,7 @@ __metadata: "@types/passport": "npm:^1.0.17" "@types/passport-facebook": "npm:^3.0.4" "@types/passport-github2": "npm:^1.2.9" + "@types/passport-google-oauth20": "npm:^2" "@types/prometheus-gc-stats": "npm:^0.6.4" "@types/proxy-from-env": "npm:^1.0.4" "@types/proxyquire": "npm:^1.3.31" @@ -10100,6 +10101,7 @@ __metadata: passport-facebook: "npm:^3.0.0" passport-facebook2: "npm:^1.0.3" passport-github2: "npm:^0.1.12" + passport-google-oauth20: "npm:^2.0.0" path: "npm:^0.12.7" path-to-regexp: "npm:^6.3.0" pino: "npm:10.3.1" @@ -14792,6 +14794,17 @@ __metadata: languageName: node linkType: hard +"@types/passport-google-oauth20@npm:^2": + version: 2.0.17 + resolution: "@types/passport-google-oauth20@npm:2.0.17" + dependencies: + "@types/express": "npm:*" + "@types/passport": "npm:*" + "@types/passport-oauth2": "npm:*" + checksum: 10/534b10d00347f74014205485a96bbf80ba357de8293847cf3e1df67e7b10197fc4128f4c64be6ddf41ede61451e40627810323c26117c863cf244179dc59ee9f + languageName: node + linkType: hard + "@types/passport-oauth2@npm:*": version: 1.8.0 resolution: "@types/passport-oauth2@npm:1.8.0" @@ -30405,6 +30418,15 @@ __metadata: languageName: node linkType: hard +"passport-google-oauth20@npm:^2.0.0": + version: 2.0.0 + resolution: "passport-google-oauth20@npm:2.0.0" + dependencies: + passport-oauth2: "npm:1.x.x" + checksum: 10/bfd1316ec7cbef5c25f41daa752eade509dffd3016cc962bf2935d577b3dcfa379d8f0d177e28dd1af03b443cc04382108956a505c0134973f85c155adfd8101 + languageName: node + linkType: hard + "passport-oauth2@npm:1.x.x": version: 1.8.0 resolution: "passport-oauth2@npm:1.8.0"