lundi 10 septembre 2018

JWT Authentication with Rails and Ember JS

What is the right way to proceed the logout action of the User when using JWT, Rails API and a JS front-end framework, for example Ember JS ? What I'm actually doing is: - check the presence and pass in a token in every request between Rails API and Ember JS apps.

Should I keep a token value in the backend model (User, for example) ? I need it to make another request in the background on the backend side.

Should I set the token value to nil when the User logs out ?

Actually the token value is kept in a cookie on the client side (see https://github.com/simplabs/ember-simple-auth for more details).

Thank you.




Aucun commentaire:

Enregistrer un commentaire