I am implementing a anglar based form builder and renderer application. It is supposed to have a JWT based authentication with refresh tokens as well. I was able to use the fetch plugin in formio to intercept the request and add my JWT token. However now I am stuck.
When the JWT expires, I need to intercept the 401 response and reauthenticate the user from the backend and generate a new JWT. With this new JWT, I need to fetch the API again and send the response.
Any suggestions on this are most welcome.