📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!
TypeScript chartsclickhousedockergdprgoogle-analyticsmetricsmonitoringmysqlnestjsprivacyredisself-hostedselfhostedstatisticstailwindcssweb-analyticswebanalyticswebsite
fixed redirect url & route
Blue Mouse85c28b06229c
diff --git a/src/auth/auth.controller.ts b/src/auth/auth.controller.tsindex 1615a408f..eee162dbf 100644--- a/src/auth/auth.controller.ts+++ b/src/auth/auth.controller.ts@@ -429,7 +429,7 @@ export class AuthController {}@ApiOperation({ summary: 'Auth user' })- @Post('google/process-code')+ @Post('google/process-token')@Public()async processGoogleCode(@Body() body: AuthUserGoogleProcessCodeDto,diff --git a/src/auth/auth.service.ts b/src/auth/auth.service.tsindex 728161204..1c643a85c 100644--- a/src/auth/auth.service.ts+++ b/src/auth/auth.service.ts@@ -28,12 +28,14 @@ import {import { TelegrafContext } from 'src/user/user.controller'import { UserService } from 'src/user/user.service'import { ProjectService } from 'src/project/project.service'-import { REDIS_SSO_UUID, redis } from 'src/common/constants'+import { REDIS_SSO_UUID, redis, PRODUCTION_ORIGIN, isDevelopment } from 'src/common/constants'import { UserGoogleDTO } from '../user/dto/user-google.dto'const REDIS_SSO_SESSION_TIMEOUT = 60 * 5 // 5 minutesconst getSSORedisKey = (uuid: string) => `${REDIS_SSO_UUID}:${uuid}`+const GOOGLE_OAUTH_REDIRECT_URL = isDevelopment ? 'http://localhost:3000/socialised' : `${PRODUCTION_ORIGIN}/socialised`+@Injectable()export class AuthService {oauth2Client: Auth.OAuth2Client@@ -557,7 +559,7 @@ export class AuthService {const uuid = uuidv4()const auth_url = await this.oauth2Client.generateAuthUrl({state: uuid,- redirect_uri: 'http://localhost:3000/socialised',+ redirect_uri: GOOGLE_OAUTH_REDIRECT_URL,scope: 'email',response_type: 'token',})