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

Add admin authentication functionality + Lots of Authentication fixes #94

Merged
merged 7 commits into from
Feb 29, 2024

Conversation

Eric-Fithian
Copy link
Collaborator

closes #92 #91

  • Fixed tests with cookie persistence.
  • Vendor login/auth fixed
  • User object now fixed
  • HttpClient changed slightly

This pull request adds the functionality to authenticate admin users. It includes the following changes:

  • Added admin authentication service and repository

  • Added admin login route and controller

  • Added admin authentication middleware

  • Added admin authentication tests

@Eric-Fithian Eric-Fithian requested a review from nh602 February 29, 2024 03:24
router.post('/login', getAdminByEmail, signAdminToken, (req, res) => {
res.status(200).json({status: 'success'});
});
router.post('/login', getAdminByEmail, authenticateAdmin, signAdminToken, sendSuccessResponse);

Check failure

Code scanning / CodeQL

Missing rate limiting High

This route handler performs
a database access
, but is not rate-limited.
router.post('/', createVendor, (req, res) => {
res.status(200).json({status: 'success'});
});
router.post('/', createVendor, sendSuccessResponse);

Check failure

Code scanning / CodeQL

Missing rate limiting High

This route handler performs
a database access
, but is not rate-limited.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

should probably remove that log.

@nh602 nh602 merged commit c1a4c23 into main Feb 29, 2024
1 of 2 checks passed
@nh602 nh602 deleted the 92-admin-service-on-frontend branch February 29, 2024 18:56
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.

admin service on frontend
2 participants