feat(auth): add registration and verification browser flow
This commit is contained in:
1 parent
391af7a1ef
commit
b2322bc178
41 files changed
+2144
-81
No files matched your search
@@ -0,0 +1,25 @@
|
||||
import type { Account } from "../../../shared/api/schemas";
|
||||
import { paths } from "../../../shared/config";
|
||||
|
||||
/** Resolve the next page from the server-owned onboarding state. */
|
||||
export function getOnboardingDestination(
|
||||
account: Pick<Account, "scenario" | "onboarding_step">,
|
||||
): string {
|
||||
if (account.scenario === "employer") {
|
||||
return account.onboarding_step === "completed" ? paths.employer.root : paths.employer.company;
|
||||
}
|
||||
|
||||
switch (account.onboarding_step) {
|
||||
case "candidate_consents":
|
||||
case "candidate_questionnaire":
|
||||
return paths.candidate.onboarding;
|
||||
case "candidate_profile":
|
||||
return paths.candidate.profile;
|
||||
case "candidate_assessment":
|
||||
return paths.candidate.assessment;
|
||||
case "employer_company":
|
||||
return paths.candidate.onboarding;
|
||||
case "completed":
|
||||
return paths.candidate.root;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user