Skip to content

Fix registration flow to use local authentication #43

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
michaelstingl opened this issue Mar 3, 2025 · 0 comments
Open

Fix registration flow to use local authentication #43

michaelstingl opened this issue Mar 3, 2025 · 0 comments

Comments

@michaelstingl
Copy link

michaelstingl commented Mar 3, 2025

Issue Description

Currently, the registration link in the login page points to an external website (https://toplocs.com/register) instead of using a local registration page within the application. This creates a disjointed user experience and prevents local testing of the registration flow.

Impact on Local Development

This is particularly problematic for local development setups:

  • Developers cannot test the complete user onboarding flow locally
  • The external link makes it impossible to test registration with the local backend
  • New users testing the application locally have no way to create accounts
  • Integration testing of the registration process is blocked
  • QA engineers cannot verify the full authentication flow in test environments

Expected Behavior

The "SignUp" link on the login page should lead to a local registration page within the application, allowing users to register without leaving the app and connecting to the local backend.

Current Behavior

Clicking the "SignUp" link navigates to https://toplocs.com/register, which is an external site, making local testing impossible.

Proposed Solution

  1. Create a new RegisterPage.vue component for handling user registration
  2. Add a route for /register in the router configuration
  3. Update the "SignUp" link in LoginPage.vue to point to the local route
  4. Enhance the user composable with a register function to handle API requests

Technical Details

The registration API endpoint /api/user is already implemented in the backend, but needs to be properly integrated with the frontend. The solution should ensure that:

  • Registration requests go to the same backend URL configured in the .env file
  • Authorization tokens are properly stored after successful registration
  • Error handling is consistent with the login flow

Related PR

A potential solution has been implemented in michaelstingl#1

Benefits

  • Improved user experience by keeping users within the application
  • Better testability of the registration flow in local development
  • Consistent authentication experience across the application
  • Simplified onboarding for new developers
  • Complete end-to-end testing capability in all environments
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

No branches or pull requests

1 participant