Persisting authentication token in AngularJS
问题 I'm building an AngularJS application that interacts with an API that uses authentication tokens to authenticate users. Everything seems to be working fine, but I'm struggling with a way to properly persist the authentication token between requests. At the moment, when a user logs in with correct credentials an authToken is returned, and I'm setting that on $rootScope.authToken . I'm also sending that auth token for future requests, but if I do a hard reload reload the webpage with F5