-
-
Notifications
You must be signed in to change notification settings - Fork 143
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
Bearer : when invalid token, done(null,false) returns an error #65
Comments
Can you provide a stack trace for that error? It will help diagnose where the actual issue is. |
I don't know how I can get the stack trace I have no error on the console |
If you set the |
I set NODE_ENV=development but it does not return anything in the console:
|
Unfortunately, without a stack trace its going to be hard to reproduce this issue or pinpoint it to a bug in Passport. Please update this issue with that information once you have it. Thanks. |
Using passport-http-bearer, the done function with false as a user throws an error.
Same error if using passport-jwt
Expected behavior
From passport documentation :
By default, if authentication fails, Passport will respond with a 401 Unauthorized status, and any additional route handlers will not be invoked. If authentication succeeds, the next handler will be invoked and the req.user property will be set to the authenticated user.
Actual behavior
Environment
The text was updated successfully, but these errors were encountered: