Skip to content

fix(auth): redirect to login when signup email already exists#191

Merged
viferga merged 4 commits intometacall:masterfrom
vikram-2101:fix-signup-redirect-login
Mar 9, 2026
Merged

fix(auth): redirect to login when signup email already exists#191
viferga merged 4 commits intometacall:masterfrom
vikram-2101:fix-signup-redirect-login

Conversation

@vikram-2101
Copy link
Contributor

This PR fixes an issue where attempting to sign up with an existing
email caused the CLI to loop back into the signup flow.

Updated behavior:

  • Detects existing-account errors
  • Informs the user clearly
  • Redirects to the login flow instead of retrying signup

This prevents infinite loops and improves CLI UX.

@vikram-2101
Copy link
Contributor Author

Hi maintainers 👋

This PR improves the signup UX by preventing retry loops
when an email already exists and redirects users to login instead.

Please let me know if any changes are required.
Happy to update.

Thanks!

@viferga
Copy link
Member

viferga commented Feb 25, 2026

The CI is failing, I won't merge it unless you solve it.

@vikram-2101
Copy link
Contributor Author

Fixed the CI issue. It was a Prettier lint error due to line endings.
Please let me know if anything else needs adjustment.

@pkspyder007
Copy link

@vikram-2101 can you add test case for this change
you can add it to this file login.cli.integration.spec.ts

@vikram-2101
Copy link
Contributor Author

vikram-2101 commented Mar 3, 2026

@vikram-2101 can you add test case for this change you can add it to this file login.cli.integration.spec.ts

There is already a test for existing email but it was written for the signup logic which failes immediately. Now when it redirects to login instead of throwing an error, so I’ll update it accordingly.

image

vikram-2101 and others added 2 commits March 3, 2026 15:53
@vikram-2101 vikram-2101 force-pushed the fix-signup-redirect-login branch from 8be5f3e to b291ce6 Compare March 6, 2026 12:10
@vikram-2101
Copy link
Contributor Author

@pkspyder007 I’ve implemented the test case in login.cli.integration.spec.ts and pushed the update to the PR.

@viferga viferga merged commit 2747ad4 into metacall:master Mar 9, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants