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

New Login Flow for Clerk #279

Open
nguernse opened this issue Jul 24, 2024 · 1 comment
Open

New Login Flow for Clerk #279

nguernse opened this issue Jul 24, 2024 · 1 comment

Comments

@nguernse
Copy link
Contributor

Instead of the default Clerk components, develop the following:

  • Sign In
  • Sign Up
  • Sign Out
@helmturner
Copy link
Member

What's happening is that we're using Clerk's pre-built components for auth, which limits our customization abilities. Since it's a more common use-case for Clerk in general, Clerk expects the "Sign Up" flow to be distinct from the "Sign In" flow—i.e. one must create an account before signing in.

Since we're only using GitHub OAuth as a sign-in method, from a user perspective, there is no difference between Sign In and Sign Up; as long as they're signed in to GitHub, it should be one click regardless of whether they already have an account or not.

Clerk's components, however, distinguish between the two. That is, it's not possible to 'Sign Up' using the Sign-in button, and vice-versa. While our "Sign In" modal does have a link to "Sign Up", that option is easily over-looked (especially if user's don't expect it to be a necessary step).

If we continue with a 'Github Only' auth flow, the ideal solution would involve 1 modal, and 1 button, that essentially UPSERTs a user. Given Clerk's customizability, this is almost certainly feasible... however, the complexity of the fix depends on whether this can be configured in Clerk's dashboard or not. If not, we may need to implement an auth endpoint on the backend to handle the upsert logic. In any case, this will almost certainly require a custom LogIn modal to replace the pre-built Clerk component.

CC @nguernse @zenlex @randomontherun

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

2 participants