flarebase-auth
flarebase-auth copied to clipboard
Added caching of x509 public keys and toolkit public keys
This PR introduces necessary caching mechanism for Cloudflare network. x509 public keys are now cached using max-age returned from the initial request. And toolkit public keys are cached using Cache API.
Please note, without such caching eventually Google starts to throttle those fetches and in some cases would result in Auth taking more than 20 seconds. I am having some conversations with Firebase staff about it but it seems that Google just doesn't like CF network frequently fetching the keys.