added env example

This commit is contained in:
yousef-khriasat-uba
2024-08-25 10:53:27 +03:00
committed by GitHub
parent bc0a8627c4
commit 20156568e2
2 changed files with 5 additions and 2 deletions

View File

@ -90,3 +90,6 @@ FIREBASE_DATABASE_URL=
OTP_LIMITER=
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=

View File

@ -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',