sahat / satellizer

Token-based AngularJS Authentication
https://satellizer-sahat.rhcloud.com
MIT License
7.85k stars 1.13k forks source link

How to refresh accesstoken after expiration #921

Open aptest3 opened 8 years ago

aptest3 commented 8 years ago

If accesstoken expired , how can i get new accessToken without sign in again

ghost commented 8 years ago

You would create a refresh endpoint on your backend implementation and just set the auth token to be the token from the response.

Something like this:

$auth.setToken(refreshResponse.data.token);