3 ms·
PM of KV here. People have certainly done auth with Workers and KV before. https://liftcodeplay.com/2018/10/16/pushing-my-api-to-the-edge-part-2-authentication
by steveklabnik 7y ago
PM of KV here.
People have certainly done auth with Workers and KV before. https://liftcodeplay.com/2018/10/16/pushing-my-api-to-the-edge-part-2-authentication-and-authorization/ https://liftcodeplay.com/2018/10/16/pushing-my-api-to-the-ed... and https://gist.github.com/bcnzer/04620abc992da72f83f6f1c61d71c93c https://gist.github.com/bcnzer/04620abc992da72f83f6f1c61d71c... are two examples I've seen using JWT. We added expirations to KV to handle these sorts of use cases. I don't have a pre-built firebase example handy, but I think this should work pretty well. You'd store the ID and refresh tokens in KV, and then use those when talking to Firebase. Sounds about right. Feel free to reach out if you give it a shot and run into issues: sklabnik@cloudflare.com
- jamesmcintyre 7y agoThanks @steveklabnik! That helps a lot! I'll reach out if I run into trouble!