[Messaging] Fix gmail connected account creation redirect url (#3653)
This commit is contained in:
@ -7,12 +7,14 @@ import { GoogleGmailOauthGuard } from 'src/core/auth/guards/google-gmail-oauth.g
|
|||||||
import { GoogleGmailRequest } from 'src/core/auth/strategies/google-gmail.auth.strategy';
|
import { GoogleGmailRequest } from 'src/core/auth/strategies/google-gmail.auth.strategy';
|
||||||
import { GoogleGmailService } from 'src/core/auth/services/google-gmail.service';
|
import { GoogleGmailService } from 'src/core/auth/services/google-gmail.service';
|
||||||
import { TokenService } from 'src/core/auth/services/token.service';
|
import { TokenService } from 'src/core/auth/services/token.service';
|
||||||
|
import { EnvironmentService } from 'src/integrations/environment/environment.service';
|
||||||
|
|
||||||
@Controller('auth/google-gmail')
|
@Controller('auth/google-gmail')
|
||||||
export class GoogleGmailAuthController {
|
export class GoogleGmailAuthController {
|
||||||
constructor(
|
constructor(
|
||||||
private readonly googleGmailService: GoogleGmailService,
|
private readonly googleGmailService: GoogleGmailService,
|
||||||
private readonly tokenService: TokenService,
|
private readonly tokenService: TokenService,
|
||||||
|
private readonly environmentService: EnvironmentService,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
@Get()
|
@Get()
|
||||||
@ -44,6 +46,8 @@ export class GoogleGmailAuthController {
|
|||||||
refreshToken,
|
refreshToken,
|
||||||
});
|
});
|
||||||
|
|
||||||
return res.redirect('http://localhost:3001/settings/accounts');
|
return res.redirect(
|
||||||
|
`${this.environmentService.getFrontBaseUrl()}/settings/accounts`,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user