paulmccarron / spotify-playlist-janitor

1 stars 0 forks source link

Add JWT authentication #44

Closed paulmccarron closed 1 year ago

paulmccarron commented 1 year ago

Add users table to database (ID, Username, Password, IsAdmin).

Add endpoint: POST auth/register, to add username and hashed password to users table, first user added is set to isAdmin: true, every subsequent user is not.

Add JWT token issuing via endpoint: : POST auth/login, token will contain user email, roles, and expiry time encoded into it. Password is hashed and compared to hashed password in the database.

Update ERD documentation.