Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Login Endpoint #148

Merged
merged 11 commits into from
Jan 27, 2024
Merged

Login Endpoint #148

merged 11 commits into from
Jan 27, 2024

Conversation

ansengarvin
Copy link
Collaborator

b.mp4

Major Backend Changes

  • Added two new dependencies to pyproject.toml: PyJWT and Passlib. I also had the poetry.lock file automatically updated, but I'm not sure if this is good. Please test it!
  • Added a router to server.py. This will allow us to have some file separation a we continue to implement our API. Right now, only users are file-separated.
  • Implemented some first-party authentication functions in "auth.py"
  • Implemented user login endpoint in "api/users.py". This takes in an email and a password, and returns a signed JSON Web Token to the user. Each token lasts for 24 hours.

Because there are new dependencies, you should run the soft_restart command to install them.

Closes #129

@ansengarvin ansengarvin marked this pull request as draft January 26, 2024 10:32
@ansengarvin ansengarvin marked this pull request as ready for review January 26, 2024 10:53
Copy link
Member

@xnought xnought left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great code, much better than what I could've done. Legitmately very nice job

Copy link
Member

@xnought xnought left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great code, much better than what I could've done. Legitmately very nice job

@xnought xnought merged commit 80897e6 into main Jan 27, 2024
3 checks passed
@xnought xnought deleted the login branch January 27, 2024 02:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create user login endpoint in API
2 participants