This sample demonstrates Actions on Google features for use on Google Assistant including account linking and Google Sign In -- using the Node.js client library, Firebase Authentication, and deployed on Cloud Functions for Firebase.
- Node.js and NPM
- We recommend installing using nvm for Linux/Mac and nvm-windows for Windows
- Install the Firebase CLI
- We recommend using MAJOR version
8
,npm install -g firebase-tools@^8.0.0
- Run
firebase login
with your Google account
- We recommend using MAJOR version
- From the Actions on Google Console, New project > Create project > under What kind of Action do you want to build? > Custom > Blank project
- Return to the Actions on Google Console.
- From the top navigation menu under Develop > Account linking (left nav), under Google Sign In Client Information, copy the value of Client ID issued by Google to your Actions.
- Return to your local copy of the sample.
- Open the
.env
file in thesdk/webhooks/ActionsOnGoogleFulfillment/
directory, and replace ${CLIENT_ID} with the value you got from the Console in the previous step.
- From the Firebase console, find and select your Actions on Google Project ID
- In the left navigation menu under Develop section > Authentication > Sign-in method > Select Google > Toggle Enable > Click Save
- From the Firebase console, find and select your Actions on Google Project ID
- In the left navigation menu under Develop section > Database > Create database button > Select Start in test mode > Done
- Install the Actions CLI.
- Navigate to
sdk/settings/settings.yaml
, and replace<PROJECT_ID>
with your project ID. - Run
gactions login
to login to your account. - Run
gactions push
to push your project. - Run
gactions deploy preview
to deploy your project.
- You can test your Action on any Google Assistant-enabled device on which the Assistant is signed into the same account used to create this project. Just say or type, "OK Google, talk to my test app".
- You can also use the Actions on Google Console simulator to test most features and preview on-device behavior.
- Questions? Go to StackOverflow or the Assistant Developer Community on Reddit.
- For bugs, please report an issue on Github.
- Actions on Google Documentation
- Actions on Google Codelabs
Please read and follow the steps in the CONTRIBUTING.md.
See LICENSE.