Skip to content

How to create and how to verify Firebase ID token using private key in Cloudflare Workers #631

Answered by panva
step135 asked this question in Q&A
Discussion options

You must be logged in to vote

Why is it working in Node and not in Cloudflare Workers?

Because they're different crypto runtimes with different prerequisites and quirks. For instance the importPKCS8 documentation clearly states that the alg argument is only applicable in WebCryptoAPI runtimes, e.g. CF Workers, not Node. Then, Node.js crypto automatically extracts public keys from private ones when verifying, WebCryptoAPI doesn't.

Generally speaking more than single simple sentenses are needed from you if you want to get any help. For instance you have yet to provide any actual executable code sample, stack traces, context, links to docs explaining what and why you're doing.

To a very clear recent issue with accepted…

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@step135
Comment options

@panva
Comment options

@step135
Comment options

@panva
Comment options

Answer selected by panva
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants