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
Describe the bug
When triggering
this.$auth.logout()while having the optionmakeRequest: truemakes the request to the backend with the Authorization token set toBearer null.After reading the code, in case
makeRequestis 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
Bearer nullExpected behavior