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

Auth Routes #49

Merged
merged 5 commits into from
Feb 4, 2024
Merged

Auth Routes #49

merged 5 commits into from
Feb 4, 2024

Conversation

MatheusSanchez
Copy link
Owner

@MatheusSanchez MatheusSanchez commented Feb 3, 2024

  • Add authentication to all routes that are supposed to be logged in. ✅

Improvements

We could improve the routes now that we are using JWT tokens and limit API resource access.

For example:

Currently, if you are logged in, you can search for a user using the get user by id route by passing another user's ID as a query parameter.

This happens because the route uses the JWT token just for authentication and not to search for the user.

This would also prevent us from needing to export the userId from the create-authenticate-user.ts file, which is used for our tests, and to complete the route path (through query parameters) in the tests.

These improvements are not done yet since they will require changing the URLs that the front-end sends to us. We are one day away from delivering the project, and including this PR, the routes are safe and without any security leaks.

Let's open an issue in the frontend and backend to address this smoothly
https://github.com/MatheusSanchez/orange-front

@MatheusSanchez MatheusSanchez changed the title getProjectsByUserId auth Auth Routes Feb 4, 2024
@MatheusSanchez MatheusSanchez marked this pull request as ready for review February 4, 2024 00:40
@pedrodecf pedrodecf merged commit c246eb1 into master Feb 4, 2024
2 checks passed
@MatheusSanchez MatheusSanchez deleted the auth-routes branch February 4, 2024 21:49
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.

None yet

2 participants