🐛 fix(api.tsx): update Authorization header to use access_token from cookies instead of accessToken variable to fix authentication issue
This commit is contained in:
parent
8f01f5c838
commit
610e94759a
1 changed files with 3 additions and 1 deletions
|
|
@ -40,7 +40,9 @@ function ApiInterceptor() {
|
|||
try {
|
||||
if (error?.config?.headers) {
|
||||
delete error.config.headers["Authorization"];
|
||||
error.config.headers["Authorization"] = `Bearer ${accessToken}`;
|
||||
error.config.headers["Authorization"] = `Bearer ${cookies.get(
|
||||
"access_token"
|
||||
)}`;
|
||||
const response = await axios.request(error.config);
|
||||
return response;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue