Questions tagged jwt

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

Biometric authentication with angular

Any proposal/recommendation for biometric angular library to be used for web app, please? Is it secure to be used as authentication service? I’am thinking to use finger print reader in additional to the classic auth method (username, pwd). Source: Angular Questions

By ab dev
Published
Categorized as angular, authentication, fingerprint, jwt, npm Tagged , , , ,

"Unsupported grant type" error when trying to get the acces_token from an API (Angular)

So I keep getting this Error every time i issue a HTTP POST request. I binded the HTTP Post request to a button for testing purposes but i’ll move it to a service after I’m done testing : const body = { "grant_type" : "password", "userName" : "test", "password" : "test" } return this.http.post<any>( ‘http://vs228562.vs.hosteurope.de/KAOS/WebApi/Token’, […]

By just askin
Published
Categorized as angular, api, authentication, http, jwt Tagged , , , ,

No ‘Access-Control-Allow-Origin’ header is present on the requested resource and JWT Token does not begin with Bearer String on put method

I am working on a web-based app with angular and spring boot. Jwt is generated and the user can log in and he can see his information but when I want to edit user information it shows this error on the browser: user:1 Access to XMLHttpRequest at ‘http://localhost:8080/api/user’ from origin ‘http://localhost:4200’ has been blocked by […]

By Aurel
Published
Categorized as angular, java, jwt, spring, spring-boot Tagged , , , ,

Angular – Typescript variables scope

I’m brand new in angular. I’m trying to create a auth-guard which send a post request to the backend, and validate the JWT. If JWT is valid guard should allow the access of the requested component. This is how my auth.guard.ts looks like: canActivate( route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> […]

By solarenqu
Published
Categorized as angular, jwt, typescript Tagged , ,

No ‘Access-Control-Allow-Origin’ header is present on the requested resource and JWT Token does not begin with Bearer String

I am working on a web-based app with angular and spring boot. Jwt is generated and the user can log in but when I want to get user information after login it shows this error on the browser: Access to XMLHttpRequest at ‘http://localhost:8080/api/user/’ from origin ‘http://localhost:4200’ has been blocked by CORS policy: Response to preflight […]

By Aurel
Published
Categorized as angular, java, jwt, spring, spring-boot Tagged , , , ,

This is how it keeps the token in local storage

I want it to return token when I login in angular, but this way it returns token. return this.httpClient.post<LoginResponse>(‘/api/v1/login’, loginRequestPayload).pipe(map(data => { this.localStorage.store("token", data.token); this.localStorage.store(‘success’, data.success); this.localStorage.store(‘userId’, data.userId); i don’t know what ngx-webstorage is. I can’t send token to backend while post process. userId null! intercept intercept(request: HttpRequest<unknown>, next: HttpHandler): Observable<HttpEvent<unknown>> { let token = […]

By aglot08
Published
Categorized as angular, jwt, webapi Tagged , ,

Angular app compiles but serves nothing due to polyfils with web pack < 5

I’m trying to use ‘jsonwebtoken’ for and Angular 12 app and getting these errors BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. This is no longer the case. Verify if you need this module and configure a polyfill for it. If you want to include a polyfill, you […]

By Jesse Reyes Cortes
Published
Categorized as angular, jwt, webpack-5 Tagged , ,

Losing API JWT authentication on Angular rebuild

Sorry if this is not appropriate for this forum, but I’m not sure what to do. I am not posting code here because I’m hoping this question will prompt suggestions of 3-4 things I can look at/try. I am using 2 boilerplates made available by a gifted developer: a C# .net core webAPI and Angular […]

By Learning
Published
Categorized as .net, angular, authentication, jwt, webapi Tagged , , , ,

Angular 12 – Check if its logged on startup – initializer working wrong

I want to ask what could be wrong in my initializer, i test the refresh token and is going well (test when is executed with the startRefreshTokenTimer). The initializer is executing and sending the Bearer token in the header, the query refreshToken is tested and working (return a valid response). Meanwhile when used in the […]

By Agustin
Published
Categorized as angular, graphql, jwt, typescript Tagged , , ,

How can I get my JWT from my header response?

I make a Angular/Java project and I can’t get the JWT token which is in my response. onLoggedin() { this.authService.login(this.user).subscribe((data)=> { let jwToken = data.headers.get(‘Authorization’); this.authService.saveToken(jwToken); this.router.navigate([‘/’]); },(err)=>{ this.err = 1; }); this method calls the following method in my service login(user : User) { return this.http.post<User>(this.apiURL+’/login’, user , {observe:’response’}); } When I check the […]

1 2 3 4 17

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