-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When triggering this.$auth.logout() while having the option makeRequest: true makes the request to the backend with the Authorization token set to Bearer null.
After reading the code, in case makeRequest is true, after leaving the if condition, it will clear the store data before the timing that the promise resolves, leading to the token to used be null.
To Reproduce
- Create a basic example
- Set the logoutData option makeRequest to true in order to call the backend
- Execute $auth.logout()
- In the headers the request Authorization header will be:
Bearer null
Expected behavior
- In case makeRequest is enabled for logout the store should only be clean on resolve of the promise
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working