I am deploying a Sveltekit application which uses firebase. I am validating the token on the server using Panva/Jose library (since Cloudflare workers does not support firebase-admin). The entire validation consists of fetching the google public keys, parsing them using the authkeysolver method, and then using the output of this function as an input to jwtVerify to validate the idToken.
The entire process works great on local but when I deploy to Cloudflare pages, I am getting the following error:
“TypeError: failed to parse the X.509 certificate”.
Does anyone have any idea how to get past this?