I tried to get the API quickstart working. Copy pasted it unchanged. When I try to validate a request I get “UnauthorizedError: secret or public key must be provided”
I’m sending the idToken I get when I log in like this:
$.ajax('/api/v1/users', {
headers: {
Authorization: `Bearer ${idToken}`
}
})
Any idea what I’m doing wrong?
I figured it out. It’s very stupid, but I’ll post it here for posterity. One of my other node_modules was including the Collections node package, which had a shim which over-wrote the Array.find prototype with non-canonical behavior. This was causing an array.find in jwks-rsa to fail to work with the posted error.
How did you find the node module causing this issue? I am having the same problem now and I am thinking it could be related to a module I added…?