Not able so set the Auth header when my user logs in and has a valid auth token based on the documentation $sails.defaults.headers.common.Authorization = 'Basic '+idToken; .controller('LoginCtrl', function($scope, auth, $state, store, $sails) { auth.signin({ //some code here }, function(profile, idToken, accessToken, state, refreshToken) { //some code here ``` //Make sure that the socket server has Authorization Header Set $sails.defaults.headers.common.Authorization = 'Basic '+idToken; $state.go('home'); ``` }, function(error) { console.log("There was an error logging in", error); }); })
Not able so set the Auth header when my user logs in and has a valid auth token based on the documentation
$sails.defaults.headers.common.Authorization = 'Basic '+idToken;
.controller('LoginCtrl', function($scope, auth, $state, store, $sails) {
auth.signin({
//some code here
}, function(profile, idToken, accessToken, state, refreshToken) {
//some code here
}, function(error) {
console.log("There was an error logging in", error);
});
})