-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
This error happends when there is an old acces_token and the refresh token is outdated.
In this case directus return am HTTP 401 code, trying to execute this.storage.removeItem and throws up an error because that function is not defined in plugin.js:27.
I have fixed the error but i don't know how to make a pull request to you.
This is the code that fix this problem
plugin.js:37
removeItem: (key) => {
ctx.$cookies.remove(key)
return Promise.resolve();
}plugin.js:55
try {
const { data } = await directus.auth.refresh();
directus.auth.token = data.access_token;
} catch (error) {
// Nothing to do here, this will push to options.loginRoute route
}
Metadata
Metadata
Assignees
Labels
No labels