I have a netlify function that pulls user off of clientContext. However, when I pass a valid JWT in the Authorization header, Netlify does not decrypt the JWT and provide clientContext.user. user in this case is null. I have verified both on the browser and in the function that the JWT is being sent in the Authorization header with the correct syntax. Not sure what else to do from here.
Here’s the client code:
fetch('/.netlify/functions/create-entry', {
method: 'POST',
body: JSON.stringify(dataObject),
headers: {
Authorization: `Bearer ${netlifyIdentity.currentUser().token.access_token}`,
},
}),
