feat: redirect authenticated users from signup page (#23766)

* feat: redirect authenticated users from signup page

- Add session check in signup getServerSideProps
- Redirect to redirect parameter if present, otherwise to root
- Follows existing authentication patterns in codebase

Co-Authored-By: [email protected] <[email protected]>

* fix test

* fix test

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: unknown <[email protected]>
Co-authored-by: Anik Dhabal Babu <[email protected]>
This commit is contained in:
authored and GitHub committed 2025-09-12 23:36:00 +05:30
1 parent 2be388373f
commit a63802dea7
2 files changed
+17

No files matched your search

@@ -304,6 +304,9 @@ test.describe("Organization", () => {
});
await test.step("Signing up with the previous username of the migrated user - shouldn't be allowed", async () => {
await orgOwner.logout();
await page.goto("/");
await page.waitForLoadState();
await page.goto("/signup");
await expect(page.locator("text=Create your account")).toBeVisible();
await expect(page.locator('[data-testid="continue-with-email-button"]')).toBeVisible();