Questions tagged authorization

Explore the latest questions and answers asked by our top developers.

Static Angular App calling Azure Functions. Is it a security issue?

I have a node.js app which does authentication/authorization. I have an Azure Function which accepts auth token (validates and) executes the business logic behind (exposed through CORS). I have a static website with Angular app which redirects to node.js for auth, gets the token and calls Azure function (directly) with the same. For all subsequent […]

Custom role based Authorization in Asp.Net Core Web API 5.0 & Angular

I have an already existing database containing Two tables like User Details, UserRole. Each user can have many custom roles. I have an Angular UI application, when UI calls any action method in any of the controller, then How will I check for the User role to check for Authorization? Note-: UI will send me […]

XHR request could not be made error in Cypress, net::ERR_BLOCKED_BY_CLIENT

I’m trying to implement a test to login my page. I fill the textboxes and submit the button by using cypress. Without cypress the webpage works. In cypress, I cannot login. I could not understand why I cannot login with cypress. Here is my test script. describe(‘click_test’, () => { beforeEach(() => cy.visit(‘/’)); it(‘set user […]

By ahmet g l
Published
Categorized as angular, authorization, cypress Tagged , ,

Access the HTTP request headers from an already loaded webpage in Angular (authorization)

I’ve been working on an Angular app (that uses an Apache server with Basic auth as a proxy) that should have the following behavior: The user has access to x.x.x.x:port/dashboard and gets prompted for credentials from the apache server After that, the Angular app has access to the request headers and stores the ‘authorization’ field […]

HttpClient API Call in Angular keeps failing

I am trying to call an API within Angular that requires authorization. My code compiles, but the data does not display, and in the developer tools I get an error message saying that my access has been blocked by CORS policy and there’s no access-control-allow-origin. I have been using a CORS Chrome extension to enable […]

By rabbit44
Published
Categorized as angular, authorization, cors, httpclient Tagged , , ,

Angular Apollo WebSocketLink with dynamic header authorization

i’m consuming a graphql subscription; initially the header has an empty authorization token, after login a token variable is generated in the localstorage. What I want to do is that automatically after logging in, the token variable in the subscription header is updated, I have tried as the documentation says but the token is never […]

By erick martinez
Published
Categorized as angular, apollo, authorization, graphql Tagged , , ,

How to securely send clientid and clientsecret without oauth but custom implementation with angular and dotnet

I have a problem trying to figure it out for few days, still didn’t get any rigid solution. I have an angular app which will be publicly available so no login or credential is needed to open the website, and user id is fetched from current loggedin user. The jwt token is fetched by let’s […]

get login Authorization using nodejs, angularjs, express

i’m working on a web application using AngularJs, nodeJs, mysql, currentlly m about working on authorization using isAdmin, i’m a little bit blocked, i have to verify if the user is an admin or not then if he’s an admin, when loggedIn, he’ll be redirected to the admin’s interface and the same according to a […]

By yesmina meddeb
Published
Categorized as angularjs, authorization, mysql, node.js Tagged , , ,

why i can’t get /post data with authorization using HTTP Interceptor in the angular application and get 403 forbidden?

HttpClientInterceptor @Injectable() export class HttpClientInterceptor implements HttpInterceptor { constructor(private $localStorage: LocalStorageService) {} intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> { const token = this.$localStorage.retrieve("authontificationToken"); if (token) { const clonedRequest = req.clone({ headers: req.headers.set(‘Authorization’, `Bearer `+token) .set(‘Accept’,’application/json’) }); return next.handle(clonedRequest) } else { return next.handle(req); } } } PostService baseUrl="http://localhost:8080/api/posts"; getPost(permaLink:number):Observable<AddPostPayload>{ return this.http.get<AddPostPayload>(this.baseUrl+"/get/"+permaLink); } PostComponent import { Component, […]

How to send Authorization in HTTP request in Angular via Ajax?

Very basic GET request but I cannot find a way to include auth like I can with Angular typically. Currently setup is as follow: import { Component, ViewEncapsulation } from ‘@angular/core’; import { NavigationPaneService, ToolbarService, DetailsViewService, ContextMenuService } from ‘@syncfusion/ej2-angular-filemanager’; import {AjaxSettingsModel, SearchSettingsModel } from ‘@syncfusion/ej2-filemanager’; @Component({ selector: ‘app-op’, templateUrl: ‘./op.component.html’, styleUrls: [‘./op.component.css’], encapsulation: ViewEncapsulation.None, […]

By user68288
Published
Categorized as ajax, angular, authorization, http-headers Tagged , , ,
1 2 3

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq