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

JWT Authentication #3

Open
kartik-pant-23 opened this issue Oct 3, 2021 · 5 comments
Open

JWT Authentication #3

kartik-pant-23 opened this issue Oct 3, 2021 · 5 comments
Assignees
Labels
enhancement New feature or request Hacktoberfest 2021

Comments

@kartik-pant-23
Copy link
Owner

Create a middleware, which authenticates the requests with JWT token. Find all the requests that need to be protected, and use this middleware there. Currently, none of the requests is authenticated.

@shikhar13012001
Copy link
Contributor

Hello @kartik-pant-23 , Can I work on this, if it is still open?

@kartik-pant-23
Copy link
Owner Author

I am assigning this to you @shikhar13012001, I have added which endpoints need to be protected.

@shikhar13012001
Copy link
Contributor

I am assigning this to you @shikhar13012001, I have added which endpoints need to be protected.

Ok sir , thankyou I will do my best

@shikhar13012001
Copy link
Contributor

Sir , Do I need to add cookies as well because I am not able to get idea of how to get token in authmiddleware? Could you please guide me ?

@kartik-pant-23
Copy link
Owner Author

Hey @shikhar13012001, the client can send the token in the headers. Headers of the request can be accessed through req.headers["FieldName"]. Let's say, you choose token as field name, then it can be accessed as req.headers['token'] inside your middleware.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Hacktoberfest 2021
Projects
None yet
Development

No branches or pull requests

2 participants