1 Answer
- Newest
- Most votes
- Most comments
0
Hello,
Thank you for reaching out to us regarding the error you are facing.
To resolve the issue, I have replicated the same at my end and it worked when using the below function:-
Amplify.configure(outputs,
{
API:
{
GraphQL:
{
headers:
async () => {
const session = await fetchAuthSession();
console.log("id token", session.tokens.idToken)
return {
Authorization: session.tokens.idToken.toString(),
};
}
}
}
}
)
You can try using the above function, if in case you are facing any issue please react out to our AWS Amplify support team
answered 10 months ago
Relevant content
- asked 2 years ago
- AWS OFFICIALUpdated 4 years ago
