I'm using the JSON Web Token for Node.js in my API. In every request i have a middleware that validates the token, and return success or false. If success the page will be rendered, if not, the user will be redirect for the login page.. everything ok. My problem is: I'm using ember-simple-auth the the oauth2 authentication, which automatically catch my token and pre-concat with "Bearer". So, when i try to verify the token, i can't, because is not the same. So, how exactly should i verify?
I simple concat token = "Bearer " + access_token ?? Or i am missing some JWT helper?
Thanks.
Aucun commentaire:
Enregistrer un commentaire