diff --git a/src/app/core/services/auth/auth.service.ts b/src/app/core/services/auth/auth.service.ts index 73f921f..ae1d310 100644 --- a/src/app/core/services/auth/auth.service.ts +++ b/src/app/core/services/auth/auth.service.ts @@ -119,8 +119,12 @@ export class AuthService extends BaseApiService { const apiUrl = new URL(environment.url); const authorizationUrl = new URL('/auth/google/redirect', apiUrl.origin); + const basePath = tenant.base_path && tenant.base_path !== '/' ? tenant.base_path : ''; authorizationUrl.searchParams.set('tenant', tenant.codigo); - authorizationUrl.searchParams.set('return_url', this.document.location.origin); + authorizationUrl.searchParams.set( + 'return_url', + `${this.document.location.origin}${basePath}`, + ); this.document.location.assign(authorizationUrl.toString()); }