The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
[Messaging] Fix gmail connected account creation redirect url (#3653)
Weiko9053769616f4
diff --git a/packages/twenty-server/src/core/auth/controllers/google-gmail-auth.controller.ts b/packages/twenty-server/src/core/auth/controllers/google-gmail-auth.controller.tsindex 9a2bb1e4f99..5d489ed78af 100644--- a/packages/twenty-server/src/core/auth/controllers/google-gmail-auth.controller.ts+++ b/packages/twenty-server/src/core/auth/controllers/google-gmail-auth.controller.ts@@ -7,12 +7,14 @@ import { GoogleGmailOauthGuard } from 'src/core/auth/guards/google-gmail-oauth.gimport { GoogleGmailRequest } from 'src/core/auth/strategies/google-gmail.auth.strategy';import { GoogleGmailService } from 'src/core/auth/services/google-gmail.service';import { TokenService } from 'src/core/auth/services/token.service';+import { EnvironmentService } from 'src/integrations/environment/environment.service';@Controller('auth/google-gmail')export class GoogleGmailAuthController {constructor(private readonly googleGmailService: GoogleGmailService,private readonly tokenService: TokenService,+ private readonly environmentService: EnvironmentService,) {}@Get()@@ -44,6 +46,8 @@ export class GoogleGmailAuthController {refreshToken,});- return res.redirect('http://localhost:3001/settings/accounts');+ return res.redirect(+ `${this.environmentService.getFrontBaseUrl()}/settings/accounts`,+ );}}