Questions tagged refresh-token

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

Refresh token request being send twice

I’m running angular 12 frontend and ASP.NET Core 5 backend. The refresh token request is being send twice in a row. I can confirm that by reading the backend logs. Front-end logs The second request which is right after the first one fails. How can I fix that? I believe the problem is here, I’m […]

By nop
Categorized as angular, angular12, refresh-token, typescript Tagged , , ,

Token intercept not working after Refresh token append

I am using auth interceptor service to get the refreshToken when the API response became 401 and hit the same failed request(request with 401) with the new accessToken from the refresh-access api. I can get the refreshToken but the recalling of the failed API is not happening. Please take a look and let me know […]

Does refresh token requires Expired JWT for creating new access token?

In my recent encounter, I was trying to implement JWT Tokens storing securely in the Front-End. What my previous approach is to store access_token as well refresh_token in sessionStorage which is vulnerable to XSS attacks. Now, when access_token expires, I’ll call for /refresh endpoint to obtain a new access_token. Here I’m passing expired JWT into […]

How to retrieve the refresh token on MSA Angular library Authentiction?

I have an Angular 10 app with .Net Framework 4.7.2 Backend. The flow I need is as follows. The user authenticates in the Web application (Angular), the response token is sent to the API, the API saves it in the database and based on it, it has access to the User’s Calendar Events. Each time […]

Get refresh token when the token expires

I have to retry 5 times and get the refresh token everytime when there is an error other than 401. I am using the code below and it is ending in an infinite loop service implementation @Injectable() export class ApiService { public authenticate( credentials: Credentials, accessCode: string): Observable<Auth> { const requestBody: Record<string, any> = { […]

apollo undefined when refreshing token (angular)

I’m using the Angular Apollo client and have a working project with working authentication, only I’m really struggling the get a refresh token when the when the access token gets expired. I’m trying to refresh the token, however when i call authenticationService.refreshToken() from my authenticationService, Apollo seems to be undefined. I can’t understand why. graphql.module.ts […]

refresh token circular dependency problem for angular using graphql and apollo client

I’m trying to set up a refresh token strategy to refresh JWT in angular with GraphQL and apollo client when my request returns a 401. Error detection works, but I can’t get to the service injection. Angular returns me an error in the console about circular dependency detection ERROR Error: NG0200: Circular dependency in DI […]

Subscribe not executing after getting fresh access-token in Angular 10

I have used access-token and refresh-token mechanism for authentication in API. when my access-token gets expired I am getting 401 Unauthorized error in APIs. so I am calling request which returns fresh access-token using refresh-token which is working correctly. but issue is what ever code written inside .subscribe function is not getting re-executed. getActivePlan() { […]

Angular 10 application won’t send JWT refresh token on cross-origin request

We have an Angular front end and a web service on a different port on the same development machine. The web service is configured to allow access from localhost and the port where the Angular application is hosted. We are using JWT authentication which works for the initial authentication against the web service. We receive […]

JWT Refresh token Angular

I am not sure this is the right forum for this.In my angular application, I want to implement refresh token scenario. but we are thinking of two different approaches. we should refresh the token only when we received 401 error from the server and make a call to the api and get the new set […]

By codebot
Categorized as angular, jwt, oauth, refresh-token Tagged , , ,
1 2

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