D
D
devall2015-05-19 12:28:48
Ember.js
devall, 2015-05-19 12:28:48

How to track auth token expiration in server responses in ember-data?

Tell me such a moment, I can not understand how to track it with "regular" means. I use ember-simple-auth for authorization
with jwt (I use sails + passport on the backend)
backend gives error 400 {error: "jwt expired"}.
How to track this moment, make invalidateSession, so that the user should log in again?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
devall, 2015-05-19
@devall

the question is removed, firstly, the response should be 401, then the user is automatically "logged out"
secondly, you can track the responses by overriding ajaxError, ajaxSuccess in the adapter

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question