diff --git a/.env.example b/.env.example index 54773c4..8fb1460 100644 --- a/.env.example +++ b/.env.example @@ -90,3 +90,6 @@ FIREBASE_DATABASE_URL= OTP_LIMITER= +GOOGLE_CLIENT_ID= + +GOOGLE_CLIENT_SECRET= \ No newline at end of file diff --git a/libs/common/src/auth/services/auth.service.ts b/libs/common/src/auth/services/auth.service.ts index 5808ce7..3174b11 100644 --- a/libs/common/src/auth/services/auth.service.ts +++ b/libs/common/src/auth/services/auth.service.ts @@ -115,8 +115,8 @@ export class AuthService { async getProfile(googleCode: string) { try { const response = await axios.post('https://oauth2.googleapis.com/token', { - client_id: process.env.GOOGLE_CLIENT_ID, - client_secret: process.env.GOOGLE_CLIENT_SECRET, + client_id: this.configService('GOOGLE_CLIENT_ID'), + client_secret: this.configService('GOOGLE_CLIENT_SECRET'), code: googleCode, grant_type: 'authorization_code', redirect_uri: 'http://localhost:3000/auth/google/callback',