localStorage and logged-in user

Is there any doc or tutorial about refresh token flow and AngularJS? I mean, the right use of http interceptors and headers to detect that token has expired and ask to API for a new one.

Thanks!