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

#160886981 Create /auth/signup , /auth/login endpoints #14

Merged
merged 2 commits into from
Oct 4, 2018

Conversation

sekayasin
Copy link
Owner

@sekayasin sekayasin commented Oct 3, 2018

What does this PR do?

Have signup and login for the fast-food-fast API

Description of the task to be completed

POST /auth/signup
POST /auth/login
With those endpoints, a user can successfully create an account on fast-food-fast, the data is successfully stored in fast-food-fast db.

POST /auth/login - This endpoint at moment do tests with a username=test and password=test and generate an access token with jwt successfully.

Add Database, Register users and store to db.
Add /auth/signup, /auth/login endpoints

[Delivers #160886981]
@Kasulejoseph
Copy link

  • And always don't forget to add a screenshot of your postman
  • Add a story id as well

@sekayasin
Copy link
Owner Author

ooh yes, @Kasulejoseph thanks

api/routes.py Outdated
access_token = create_access_token(identity=username)
return jsonify(access_token=access_token), status.HTTP_200_OK

# Protect a view with jwt_required, which requires a valid access token

Choose a reason for hiding this comment

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

In-line comments is also not recommended in PEP8 so avoid it

Copy link
Owner Author

Choose a reason for hiding this comment

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

Yes

Modified /auth/login to check username and password during login

[Delivers #160886981]
@sekayasin sekayasin merged commit 14cb1f0 into develop Oct 4, 2018
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.

2 participants