sahat/satellizer

Login from token

jolleychris opened this issue · 0 comments

Hi,

I am able to generate valid JWT tokens server side, and in certain places within my application - for example activating a new user account that has been created server side (roughly speaking - dont worry about the detail here!) I can redirect to my application and pass the server side token with that request.

I would like to log the user in if the token is valid - I thought that $auth.setToken() would achieve this, but the next time the user navigates within my application, they are no longer athenticated it seems.

do I have to call auth.login with their username and password? Their password is obviously unknown to my code (and so it should be!) but the token is valid - how can I achieve a logged in, authenticated state that persists, from a token?