Skip to content
This repository was archived by the owner on Aug 25, 2024. It is now read-only.

Conversation

@pwbriggs
Copy link
Owner

Set up flows for authorization and creating accounts.

@vercel
Copy link

vercel bot commented Mar 21, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
bvs ✅ Ready (Inspect) Visit Preview May 11, 2024 4:34pm

pwbriggs added 6 commits May 11, 2024 09:33
Install & set up remix-auth, by adding Cred and Session tables to the database, installing & setting up out first strategy, remix-auth-form (with lots of backend code to check passwords, etc.). This does not include a way to create user accounts, nor proper playwright tests (some tests should fail currently).

This is not a breaking change because we don't use the database in the app yet for any purpose that would conflict with this change.
Add missing imports of prisma, which exists as a global in development only.
Oops, forgot to remove a test of the "next page after login" redirect sanitizer.
Change the utility function userExists to be called usernameExists, because users can technically be identified with a username or user id.

Also make usernameExists use a new (and exported) util function, getUserByUsername, which just  runs a prisma query.
Optimization & ease of use, plus we already need to query the User table to check if the user exists, so why not bundle the request for the happy path?
Add a test that expects unauthenticated requests to My Schedule (/my-schedule) to redirect to the login page.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants