Lightweight in-memory authentication service built with Express. All data resets whenever the server restarts, so use it for demos and local development only.
http://localhost:3000
Creates a new user record.
{
"username": "jdoe",
"name": "Jane Doe",
"password": "superSecure123"
}{
"message": "user created",
"user": {
"id": "uuid-v4",
"username": "jdoe",
"name": "Jane Doe"
}
}Validates credentials and returns the sanitized user object.
{
"username": "jdoe",
"password": "superSecure123"
}Updates a user's password after verifying the current password.
{
"username": "jdoe",
"currentPassword": "superSecure123",
"newPassword": "evenBetter456"
}Fetches a specific user by username (sanitized fields only).
Returns all users sorted by createdAt (newest first) with sanitized fields.
400– missing required fields.401– invalid credentials or incorrect current password.404– user not found.409– username already exists.500– unexpected server error.
- Passwords are hashed with bcrypt before storage.
- Since the datastore is in-memory, restart the server to clear all users.