Commit graph

6 commits

Author SHA1 Message Date
Muhammad Nauman Raza 8784322429 chore: remove empty line 2023-11-23 13:19:09 +00:00
Muhammad Nauman Raza a57b68891b feat(backend): websockets with player co-ordination and JWT auto-generation 2023-08-20 12:50:21 +01:00
Abdulmujeeb Raji 4c536581e1 hotfix(backend): create real error for missing JWT_SECRET 2023-07-31 15:44:38 +01:00
Abdulmujeeb Raji 8cf3bbda1f feat(backend): update and delete users
The title says most of it. For authentication, the token gotten from the POST
method can be put as a 'Token' header. It's then validated before being used.

Other changes caused by this update are:
- Fixed a bug where the creation token was unusable due to lacking the
  user password hash
- Changed the signing method to HMAC, requiring a string for encryption
  This is mentioned in the README.md
2023-07-28 18:17:01 +01:00
Muhammad Nauman Raza f800cafb1d chore(backend): polish things up a little 2023-07-26 22:09:31 +01:00
Abdulmujeeb Raji e08adc96ae feat(backend): Create Users and Get JWT
Introducing a unified signup and login API. You can post to the /user
route with credentials (so far just name and password), and if the user
doesn't exist, we create the user and return a token. If the user does
exist, if the password inputted matches the database password, we return
a token for that user, else we return an error.

i've never wanted to kms more during a programming session
2023-07-26 21:16:25 +01:00