fix(auth): Invite with public url and social sso. (#10216)
Correct the URL parameter name from "inviteHash" to "workspaceInviteHash" and enhance domain URL handling for multi-workspace environments.
This commit is contained in:
@ -29,7 +29,7 @@ describe('DomainManagerService', () => {
|
||||
|
||||
expect(result).toEqual({
|
||||
customUrl: 'https://custom-host.com/',
|
||||
subdomainUrl: 'https://subdomain.example.com/',
|
||||
subdomainUrl: 'https://example.com/',
|
||||
});
|
||||
});
|
||||
|
||||
@ -39,6 +39,7 @@ describe('DomainManagerService', () => {
|
||||
.mockImplementation((key: string) => {
|
||||
const env = {
|
||||
FRONTEND_URL: 'https://example.com',
|
||||
IS_MULTIWORKSPACE_ENABLED: true,
|
||||
};
|
||||
|
||||
return env[key];
|
||||
@ -104,7 +105,6 @@ describe('DomainManagerService', () => {
|
||||
.mockImplementation((key: string) => {
|
||||
const env = {
|
||||
FRONTEND_URL: 'https://example.com',
|
||||
|
||||
IS_MULTIWORKSPACE_ENABLED: true,
|
||||
DEFAULT_SUBDOMAIN: 'test',
|
||||
};
|
||||
@ -125,7 +125,6 @@ describe('DomainManagerService', () => {
|
||||
.mockImplementation((key: string) => {
|
||||
const env = {
|
||||
FRONTEND_URL: 'https://example.com',
|
||||
|
||||
IS_MULTIWORKSPACE_ENABLED: true,
|
||||
DEFAULT_SUBDOMAIN: 'default',
|
||||
};
|
||||
|
||||
@ -217,7 +217,9 @@ export class DomainManagerService {
|
||||
private getTwentyWorkspaceUrl(subdomain: string) {
|
||||
const url = this.getFrontUrl();
|
||||
|
||||
url.hostname = `${subdomain}.${url.hostname}`;
|
||||
url.hostname = this.environmentService.get('IS_MULTIWORKSPACE_ENABLED')
|
||||
? `${subdomain}.${url.hostname}`
|
||||
: url.hostname;
|
||||
|
||||
return url.toString();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user