Using token as auth method, how would you catch 401 or 403 errors in order to refresh the token?
This is how we use PouchDB:
const remoteDB = (authToken: string) => {
return new PouchDB(remoteDBURL, {
headers: {
Authorization: `Bearer ${authToken}`,
}
});
};
config:
Based on what I've tried so far, these errors are not emitted on the .onError callback.
Any help / ideas would be very appreciated.
Using token as auth method, how would you catch 401 or 403 errors in order to refresh the token?
This is how we use PouchDB:
config:
Based on what I've tried so far, these errors are not emitted on the
.onErrorcallback.Any help / ideas would be very appreciated.