# Sign-Up and Sign-In Routes

A sign-up route hashes the password, saves the student behind a unique index on email and answers 409 for an email that's taken, and a sign-in route checks the password with compare and answers one vague 401 for any mistake, never sending a hash back.

![Cheat sheet: Sign-Up and Sign-In Routes](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/8878632c9152428bb5a87148d6a057a8.webp)

- Category: Node.js
- Level: Journeyman
- Tags: 401 Unauthorized, 409 Conflict, Authentication, mongodb, nodejs, rest-api, Unique Index
- Author: Gregor Dzierzon
- Updated: November 23, 2026

Source: https://www.ask-codey.com/cheat-sheets/node-auth-sign-up-and-sign-in-cheat-sheet
