Auth protected paths examples.
quantuminformation opened this issue · comments
Many thanks for this, I'm going to use it as boilerplate for new projects!
Would you also consider adding best practices for auth on functions within a specific path?
You are welcome!
The question about auth seems like it should be in product documentation about cloud functions. Is it not anywhere in the docs?
cloud.google.com/functions
If not, let's file a bug on our docs. And link it here.
Well there is this page
https://cloud.google.com/functions/docs/securing/
But the best auth examples I can find are here:
https://github.com/gothinkster/gcp-datastore-cloud-functions-realworld-example-app/blob/master/src/Router.js#L24
and
https://github.com/gothinkster/gcp-datastore-cloud-functions-realworld-example-app/blob/master/src/User.js#L172
This project is just a demo that was used at Google I/O 2019.
It uses API Keys for GMP auth.
If there's a missing sample directly related to Google Cloud Functions, then we should add it here (or report a bug there):
https://cloud.google.com/functions/docs/securing/authenticating