in src/components/users/signup/ko/runtime/signup.ts [97:134]
public async initialize(): Promise<void> {
try {
const isUserSignedIn = await this.usersService.isUserSignedIn();
if (isUserSignedIn) {
this.usersService.navigateToHome();
return;
}
else {
const queryParams = new URLSearchParams(location.search);
if (queryParams.has("userid") && queryParams.has("ticketid") && queryParams.has("ticket")) {
await this.usersService.activateUser(queryParams);
const userId = await this.usersService.getCurrentUserId();
if (!userId) {
console.error("Activate user error: User not found.");
} else {
this.usersService.navigateToHome();
}
} else {
const redirectUrl = this.delegationUrl();
if (redirectUrl) {
await this.router.navigateTo(redirectUrl);
}
}
}
}
catch (error) {
if (error.code === "Unauthorized" || error.code === "ResourceNotFound") {
return;
}
throw error;
}
}