You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Question: Is there any way to know if a user is still logged in? #4
Two weeks. Loopback, the framework the API is built with, doesn't use JWTs, it has its own access token scheme, and there's no refresh built in.
EDIT: And to answer your other question, the only way to tell if a user is logged in is to hit an authenticated endpoint and see what the response is. (e.g. /v0/users/current, passing the access token, and if you get a 200 you're logged in, if you get a 401 you're not)
Activity
jmwohl commentedon Nov 5, 2019
Two weeks. Loopback, the framework the API is built with, doesn't use JWTs, it has its own access token scheme, and there's no refresh built in.
EDIT: And to answer your other question, the only way to tell if a user is logged in is to hit an authenticated endpoint and see what the response is. (e.g.
/v0/users/current, passing the access token, and if you get a 200 you're logged in, if you get a 401 you're not)jvolker commentedon Nov 9, 2019
Thanks! Would be nice to have a method for that implemented directly into the jsclient.
This works for me: