-
Notifications
You must be signed in to change notification settings - Fork 117
remove method failed with JsonWebTokenError: invalid token #388
Comments
This is pretty straight-forward, so please let me know if PR is welcomed. BTW, what is exactly the purpose of it? If for token verification, then why do we use remove method? |
It's I think this is related to feathersjs-ecosystem/authentication-jwt#5, I guess |
Then ,should we make a distinction between JWT to authenticate the request, and JWT to be removed?
If we would like to support extraction of JWT to be removed, from JWT used to authenticate the request, then we have to expose IMHO, the current implementation is fine as we should make the distinction between the two. I would like to even remove header extraction support if id is missing when calling |
I had intended on adding support for |
@boybundit if you have time for a PR in the next couple days I'd love one! Otherwise I will try and get to it. In order to fix the actual issue it should split on whitespace and ignore the Bearer part. |
Closed by #403. |
Steps to reproduce
Call
DELETE /authentication
with a valid JWT in the header results in an error.Apparently, it gets a token from Authorization header without removing
Bearer
text in the beginning.Expected behavior
No error
Actual behavior
Error is thrown.
JsonWebTokenError: invalid token
System configuration
Module versions (especially the part that's not working):
NodeJS version: 6.9.1
Operating System: Windows 10
Browser Version: Chrome 55.0.2883.87 m
Module Loader: Node.js
The text was updated successfully, but these errors were encountered: