Skip to content
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

Client-Side Updates for Universal Login #230

Open
4 tasks
mahid797 opened this issue Feb 23, 2025 · 0 comments
Open
4 tasks

Client-Side Updates for Universal Login #230

mahid797 opened this issue Feb 23, 2025 · 0 comments
Assignees
Labels
Core Work to do on the core system of the App Frontend Frontend Related Issue
Milestone

Comments

@mahid797
Copy link
Collaborator

We have a custom login UI (email/password forms, etc.). When Auth0 is active, we’ll disable or redirect those forms to Auth0’s Universal Login. When Credentials are active, we keep our current forms. This ensures our UI is consistent and toggles seamlessly between two distinct auth methods.

Goals & Scope

  • Conditional UI: Show or hide the credentials login form based on AUTH_METHOD.
  • Redirect to Auth0: If AUTH_METHOD=auth0, direct the user to /api/auth/signin/auth0 or the relevant route that triggers Universal Login.
  • Manual Testing: Verify both modes (credentials vs. Auth0) function without breaking other features.

Detailed Tasks

  1. Conditional Sign-In

    • On Sign In pages, if AUTH_METHOD=auth0, replace form submission with a redirect to signIn('auth0') (NextAuth’s built-in method).
    • If AUTH_METHOD=credentials, keep the existing email/password form.
  2. Hide or Disable Additional UI

    • Sign-Up / Reset Password: If we rely on Auth0’s universal sign-up/password reset, we can hide our custom forms or direct the user to Auth0’s flow.
    • For credentials mode, keep the current UI as is.
  3. Manual QA

    • Scenario 1: AUTH_METHOD=credentials – confirm custom sign-up/sign-in/reset forms still work.
    • Scenario 2: AUTH_METHOD=auth0 – confirm the user is redirected to Auth0 for sign-in, and upon success, we see their data in Supabase.
  4. Documentation

    • Add a brief note (possibly in README.md) explaining how to switch AUTH_METHOD and what effect it has on the UI.

Acceptance Criteria

  • Toggling AUTH_METHOD=auth0 or AUTH_METHOD=credentials switches the UI seamlessly.
  • “Sign In” button triggers Auth0’s Universal Login when Auth0 is active.
  • Custom forms remain fully functional when AUTH_METHOD=credentials is set.
  • Minimal or no confusion for users regarding “where did my sign-up form go?” in Auth0 mode.
@mahid797 mahid797 added New Feature New feature to be implemented Core Work to do on the core system of the App Frontend Frontend Related Issue and removed New Feature New feature to be implemented labels Feb 23, 2025
@mahid797 mahid797 added this to the v0.1 milestone Feb 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core Work to do on the core system of the App Frontend Frontend Related Issue
Projects
None yet
Development

No branches or pull requests

2 participants