From 20156568e23737eb9936c46dac79340c08f954d6 Mon Sep 17 00:00:00 2001 From: yousef-khriasat-uba Date: Sun, 25 Aug 2024 10:53:27 +0300 Subject: [PATCH] added env example --- .env.example | 3 +++ libs/common/src/auth/services/auth.service.ts | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) 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',