Please help check if the method i used to pass the bearer authorization token, because its not working, Maybe im missing something please
apiClient.addAsyncRequestTransform(async (request) => {
const authToken = await authStorage.getToken();
if (!authToken) return;
request.headers["Authorization"] = "access " + authToken;
});
A bearer token normally starts with the phrase
bearer
. So, replace the wordaccess
withbearer
and try again: