refactor: enhance onboarding logic and update default redirect path

This commit is contained in:
Abhimanyu Saharan
2026-02-09 22:20:19 +05:30
parent f8860bbc71
commit 6f76e430f4
6 changed files with 97 additions and 12 deletions

View File

@@ -13,8 +13,8 @@ describe("resolveSignInRedirectUrl", () => {
expect(resolveSignInRedirectUrl(null)).toBe("/boards");
});
it("defaults to /dashboard when no env fallback is set", () => {
expect(resolveSignInRedirectUrl(null)).toBe("/dashboard");
it("defaults to /onboarding when no env fallback is set", () => {
expect(resolveSignInRedirectUrl(null)).toBe("/onboarding");
});
it("allows safe relative paths", () => {

View File

@@ -1,4 +1,4 @@
const DEFAULT_SIGN_IN_REDIRECT = "/dashboard";
const DEFAULT_SIGN_IN_REDIRECT = "/onboarding";
function isSafeRelativePath(value: string): boolean {
return value.startsWith("/") && !value.startsWith("//");