Skip to content

How Ocelot validate expired JWT token and re-send HttpContext with the new header ? #1884

Discussion options

You must be logged in to vote

Ocelot should not renew the access-token, only validate/unvalidate it. The end-user application should be in charge of tracking almost expiring tokens and renew them, redirecting to the login page if needed (e.g. cookie also expired on identity server). There are js libraries that will help you with that. oidc-client-js for instance. In any case, since user interaction might be needed, and token renewal is relying on user cookies, the gateway is not the place to automate this.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by raman-m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Initially seen a question could become a new feature or bug or closed ;)
2 participants
Converted from issue

This discussion was converted from issue #1519 on January 06, 2024 12:27.