Skip to content
This repository has been archived by the owner on Dec 15, 2019. It is now read-only.

Add an interceptor on the HTTP service for revoked JWT #25

Open
TotomInc opened this issue Mar 3, 2019 · 0 comments
Open

Add an interceptor on the HTTP service for revoked JWT #25

TotomInc opened this issue Mar 3, 2019 · 0 comments
Labels
bug Something isn't working pkg: discord-bot Related to the discord-bot package
Milestone

Comments

@TotomInc
Copy link
Owner

TotomInc commented Mar 3, 2019

Actually the HTTP service doesn't support API calls when the JWT is revoked.

Since the HTTP service is using axios, it's possible to add an interceptor (on a 401 response error) to do this flow:

  1. keep initial request config (to re-try it later)
  2. generate a new JWT
  3. re-try the initial request
@TotomInc TotomInc added bug Something isn't working pkg: discord-bot Related to the discord-bot package labels Mar 3, 2019
@TotomInc TotomInc added this to the 0.1.0 milestone Mar 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working pkg: discord-bot Related to the discord-bot package
Projects
None yet
Development

No branches or pull requests

1 participant