Node-1st-gen/authenticated-json-api/README.md
This sample shows how to authenticate access to a JSON API to only allow access to data for a specific Firebase user.
Only users who pass a valid Firebase ID token as a Bearer token in the
Authorization header of the HTTP request are authorized to use the API.
This sample comes with a web-based API explorer UI whose code is in the public directory. It lets you sign in to Firebase with your Google account, and create messages whose sentiments are detected by the Cloud Natural Language API.
authenticated-json-api directory.npm install -g firebase-tools and then configure it with firebase login.firebase use --add and select your project in the list.cd functions; npm install; cd -This sample comes with a web-based UI for testing the function. To test locally do:
firebase serve --only hosting,functionshttps://localhost:5000.To deploy and test on prod do:
firebase deployfirebase open hosting:site, this will open a browser.We'd love that you contribute to the project. Before doing so please read our Contributor guide.
© Google, 2017. Licensed under an Apache-2 license.