This commit adds authentication middleware for user and admin levels. The middleware retrieves the JWT from the header and verifies it. Error messages are returned for cases like no token found, user not found, unverified email, and when a user is not an admin but tries to perform an admin function.
brief-06-back
Description
Languages
TypeScript
100%