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

Returns ERROR invalid token #1

Open
itsmiranda opened this issue Jan 28, 2019 · 6 comments
Open

Returns ERROR invalid token #1

itsmiranda opened this issue Jan 28, 2019 · 6 comments

Comments

@itsmiranda
Copy link

I'm trying to use Node JWT Authentication API to build a local API

although I got the server started, it is unable to pass the username/password to the server getting Invalid Token error. How can I solve this? Thank you very much!

@VaikunthSS116
Copy link

I used Node JWT Authentication API to run local API. In POST Method i passed username & password as an JSON Format,I got an JWT token.
But I pass the JWT token in GET Method,the server getting Invalid Token error.
How can I fix these problem?

@Josh-Uvi
Copy link

Josh-Uvi commented Jul 2, 2019

@VaikunthSS116 did you use admin for both username and password? I tested this code today using Postman and there was no issue or errors. The reason you got the invalid token error is that only the admin user has access to that route /users, try admin

@itsmiranda have you tried using Postman? I tested this code today and had no issues/errors

@VaikunthSS116
Copy link

VaikunthSS116 commented Jul 3, 2019

@Josh-Uvi Thanks for the information.I Will try and update you Later.

@staminna
Copy link

@Josh-Uvi I have the server running without any issues but I can't find JWT token in postman login in with hardcoded values admin/admin as seen in the attached screenshot

Screenshot 2019-11-10 20 41 15

@staminna
Copy link

Even if I try to create an existing user

Screenshot 2019-11-10 20 56 43

@surbhibhattar
Copy link

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

No branches or pull requests

5 participants