Authorization token is null in gatsby plugin (#5848)

It creates a 401 unauthorized when trying to use a token :)
This commit is contained in:
TheAzack9
2021-05-24 16:15:13 +02:00
committed by GitHub
parent 17c043715d
commit 48cdf6e083

View File

@@ -144,7 +144,7 @@ exports.sourceNodes = async (gatsby, options) => {
}
return Object.assign(obj, {
Authorization: `Bearer ${directus.auth.token}`,
Authorization: `Bearer ${auth?.token}`,
});
};