23 questions
0
votes
1
answer
63
views
"Failed to load resource: the server responded with a status of 400 ()" error on Angular code while using login and signup functions
I am currently building this angular app, but for some reason the fetch posts for login and signup give me this error. First time when I ran the app, it went smoothly, after I loaded it a second time ...
0
votes
1
answer
359
views
How to store authorization token for HTTP call from Angular?
I am trying to make an HTTP call to our legacy APIs. These APIs use basic authorization.
When making a call from an Angular app, I have to pass this authorization token which is not a problem. My ...
0
votes
1
answer
45
views
Angular 2 multiple http requests based on status
I have question related to angular http requests. I'll send POST request with some data, if server return 404 status I need to modify data (in response body will be invalid data - I will remove them). ...
2
votes
0
answers
286
views
Get httpclient request query parameters
Hi I am using an Angular 5 interceptor to check if the HttpClient request URL contains query params but it always comes back false even though in Network I see the query param being passed.
import { ...
3
votes
0
answers
2k
views
Angular 4 : " Set Cookie " flag in Http response is not setting Cookie in browser
I'm working on a Website using Angular 4.
We are using Cookie authentication method.
After login process API response have cookie in Set Cookie field. But its not setting value in browser. So ...
1
vote
1
answer
1k
views
Making Global Authorization Header in HttpClient Interceptor
I am making a global authorization header in my app. I've used the interceptor so i won't declare the authorization header in my get() functions. Am i correctly implementing the interceptor since when ...
0
votes
2
answers
4k
views
Display Specific Detail When Click View Button in Angular 4
i need help in making this "view detail function" work. First, i had the users component which i want to imitate on how it worked. Like you have to access its service when you try to get the specific ...
2
votes
1
answer
317
views
Angular 4.3 HttpClient Multiple Authorization
I have a question about HttpClientModule, how can i use it for multiple Authorization, because when use HttpInterceptor Provider, it can only use in one case for example:
Api 1 has token A
Api 2 has ...
1
vote
0
answers
1k
views
How to make a http request with session_id from cookie
I am using angularjs2 http service to send http request. In the login API, I send a post request with user credential, the backend server generates a session_id in the response and save it on cookie. ...
1
vote
1
answer
886
views
Angular 4 Odata (ASP.net) Windows Authentication on Chrome
I have an Angular 4 service that calls an OData API. I have my API setup to work using Windows Authentication, this works via IE (version 11) but not with Chrome, where it throws a:
Failed to load ...
0
votes
0
answers
2k
views
Specify pem file with Angular 2
In my Angular 2 app, I'm using the http service to make a GET call to my website. That site is locked down via certificate funkiness. If I were making the GET call via curl I'd pass in the --cert ...
1
vote
1
answer
238
views
How do I apply state transition inside AngularJS $rootScope event listeners?
I am currently facing a problem in using angular-http-auth library which is handling a state transition from events of event:auth-loginRequired. I am using angular-ui-router for my routing systems.
...
1
vote
2
answers
841
views
add config in angular resource
I am using http-auth-interceptor for authentication. In http-auth-interceptor, I use the following way to login:
var data = 'username=' + encodeURIComponent(user.userId) + '&password=' + ...
3
votes
1
answer
3k
views
Correct way to set and override a request header in Angular
I need to set a global http header to all my requests because of the authentication method that we are using. We have an Identity Server to authenticate the user using a SSO approach. So far so good, ...
0
votes
1
answer
700
views
Angular $http Interceptor Opens Multiple Modals When Auth Fails
I am using the $http interceptor to show a login modal when $auth fails. Here is a brief set-up I have:
$provide.factory('modalWhenLoggedOut', ['$q', '$injector', '$rootScope',
function($q, ...
0
votes
0
answers
395
views
AngularJS: get protected JSON with auth headers
I have a JSON file generated by the server and to access that JSON via URL within the browser I need to log in providing username and password.
Now I am trying to get that JSON with Angular, ...
0
votes
0
answers
822
views
Using auth-http-interceptor to broadcast login-confirmed
I am using the auth-http-interceptor to broadcast login-confirmed. I have a main.html which is supposed to check whether the user is logged in.
<div class="auth-tripdelta" ng-class="{'wrapper':...
1
vote
1
answer
1k
views
AngularJS Error Code 401 handling without interceptors?
Following is the code I use, I get the Authentication Success Alert if the basic auth succeeds but the else alert "Authentication failed" is never displayed when the credentials are wrong. I do not ...
5
votes
1
answer
18k
views
angularjs basic authentication headers
I'm trying to connect to API and send authentication headers.
I'm using Base64 as described here How do I get basic auth working in angularjs?
function Cntrl($scope, $http, Base64) {
$http.defaults....
1
vote
0
answers
87
views
Restangular with angular-http-auth not working
I had been using Angular-HTTP-Auth with the basic http requests, but have since moved to Restangular and are now finding that 401's are no longer caught by HTTP-Auth. I'm assuming this is because the ...
4
votes
2
answers
2k
views
angular-http-auth with $http transformResponse
I'm using angular-http-auth to show a login dialog whenever a 401 "unauthorized" response is returned from the server.
Since I'm cool, I also try to deserialize response objects in my services. For ...
1
vote
0
answers
828
views
Protractor sendKeys fails when using angular-http-auth to display login window
I am using angular-http-auth and the example from http://witoldsz.github.io/angular-http-auth/ to display my login form.
Here is the index.html page:
<!DOCTYPE html>
<html ng-app="rdx">
&...
4
votes
1
answer
3k
views
Angularjs - Remove last history entry after $routeChangeError
I have a route which has to resolve a server side resource. That resource asks for authentication. So i show a login form popup which is cancelable. On cancel the route/resolve gets rejected and $...