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

Set up sign in and sign up #30

Merged
merged 13 commits into from
May 28, 2024
Merged

Set up sign in and sign up #30

merged 13 commits into from
May 28, 2024

Conversation

SantaClaas
Copy link
Contributor

Sign in flow is now:

---
title: "Sign in flow: The happy path"
---

flowchart LR
    A[Sign up page] --> B[Enter email & name] --> C[Open link in email] --> D[Signed in]
    E[Sign in page] --> F[Enter email] --> C

Loading

Other changes:

  • Added nanoid for better non-guessable ids that don't leak internal information such as count of users
  • Added ability to extract authenticated user information in request handlers to fetch user related data (e.g. a user's surveys)
  • ...and things I probably forgot to mention so please ask if there's any question

Not implemented:

  • Refresh session to keep users signed in as long as they are active and therefore reduce friction
  • Passkey support for less sign in steps/friction

I know this is a lot so we can go through it later if you want.

And add some passkey experimentation to simplify sign in.
Also avoid passwords like the pest
Help users understand errors with their sign in links
Send users to their personal surveys overview afters successful sign in
Tell users to check their emails after signing in
Document dependencies to make them easier to remove
Remove passkey stuff because out of scope and still in git history for later implementation
@SantaClaas SantaClaas requested a review from nherter May 26, 2024 17:53
@SantaClaas SantaClaas linked an issue May 26, 2024 that may be closed by this pull request
@SantaClaas
Copy link
Contributor Author

Forgot to mention: I've used Resend for sending emails because it was the easiest way. We could later add SMTP so users can use a private email account they have as an alternative.

@SantaClaas
Copy link
Contributor Author

Also missing: Sign out button to delete cookie and invalidate session

Copy link
Collaborator

@nherter nherter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@nherter nherter merged commit 7d1c27c into main May 28, 2024
@nherter nherter deleted the 27-set-up-sign-up-backend branch May 28, 2024 15:08
@SantaClaas
Copy link
Contributor Author

Also missing: redirect user when signed in and trying to sign in again

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.

Set up sign-up backend
2 participants