Commit graph

6 commits

Author SHA1 Message Date
Abdulmujeeb Raji 4c536581e1 hotfix(backend): create real error for missing JWT_SECRET 2023-07-31 15:44:38 +01:00
Abdulmujeeb Raji 6d5b74f7d0 Merge branch 'main' of https://github.com/devraza/ambition 2023-07-28 18:20:41 +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 bf1e867040 docs(backend): improve README 2023-07-27 15:57:32 +01:00
Abdulmujeeb Raji 52002e8f1e chore(backend): remove mentions of .env
This is no longer need in our implementation
2023-07-27 12:13:41 +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