Sign Up

πŸ¦‰ Our Remix routes are used to create both a client-side and a server-side bundle. Remix is pretty good at splitting those things up for us, but using modules that really should only be used on the server can potentially cause issues.
You can read all about Server vs. Client Code Execution in the Remix docs if you like. We're going to take advantage of Remix's feature to explicitly label a module as server-only by creating a file with .server in the name.
We don't want bcryptjs to appear in the client at all (it requires crypto anyway). 🐨 So please create and stick this in there:
import bcrypt from 'bcryptjs'

export { bcrypt }
Then in the client build auth.server.ts will be an empty module so none of the bcryptjs code or crypto code will be included in the client bundle.
πŸ‘¨β€πŸ’Ό Great! Thanks Olivia! Now, let's create a password record when we create a new user so that can be used when the user logs in. Jump into and follow the emoji.
Once you've done that, head to and try signing up a new account. It should allow you to sign in and then you can check the database for the password if you'd like to make sure it worked:
npx prisma studio