Search Posts

Category: token

Laravel + AngularJS – oauth 2.0

how to Laravel + AngularJS – oauth 2.0 I work on a project which uses Laravel and AngularJS. My task is to implement a token based auth system. The guy from back end chose to use passport to implement oauth 2.0 and everything works fine. After login and refresh I save the response (token, refresh_token, expires_in) in localStorage. The idea of the whole system is to check, 1 minute before the token expires, if the […]

Add an exception do defaults headers in angularJS

Hello I want to use external API to gather all the current currency rate. My front is based on token and I am storing token in localForage which is nothing but async localStorage. //this execute after every page refresh $localForage.getItem(‘authorization’) .then(function(authData) { if(authData) { $scope.authentication.isAuth = true; $http.defaults.headers.common.Authorization = ‘Bearer ‘ + authData.token; //set authentication variable to true and add token to every request after page refresh } }, function(){ console.log(“error with getting authorization localForage […]

Cors configuration not working spring boot + angular [duplicate]

This question already has an answer here: Response header is present in browser but not parsed by Angular $http response.headers() 2 answers i’m trying to get authentication token from header “autherntication” using angular, but when i use “console.log(response.headers()); i got only 1) cache-control 2) expires 3) pragma in dev tools there are all headers, i tried a log of filters but nothing working 🙁 , thanks for any help ! Fragment of Web configuration @Override […]