Lamba trusted auth
getAuthToken: () =>
fetch(
tokenURL,
{
method: 'POST',
body: JSON.stringify(tokenBody),
}
).then(r => r.text())
.catch(e => {
console.error(e);
return '';
})
5 Replies
Hey Michael, seems like something lamba is doing ? Did you try calling the lamba from outside (postman or something) when it's down to see if it comes back ?
Yes, the moment I call it it starts working again. That's what's odd about it. Why doesn't the init function call have the same effect?
Did you check in the network tab that it's indeed calling the right end point?
Yes, and it works great after I hit the endpoint
Checking in on this one
Not able to help more here, if the API call is made appropriately as seen in the network tab .. Its hard to tell why the lambda does not wake up. One thing might be to compare the whole curl request both from SDK and postman .. And see if there are some headers which are missing.