This is the code powering the Google Assistant app "Been Pwned" which use's Troy Hunt's Have I Been Pwned? API to determine if a given email address or website has been compromised. The two folders here contain two distinct but functionally inditical implementations of fulfillment for Dialogflow, one using the Actions on Google v2 client library and the other using Dialogflow's Fulfillment library.
Say Talk to been pwned
to any Google Assistant device or click here
- Sign up for or sign into Dialogflow
- Create a Dialogflow agent
- Restore the zip file
HaveIBeenPwned.zip
- Enable the Cloud Function for Firebase inline editor
- Copy this code in
functions/index.js
theindex.js
file in the Dialogflow Cloud Function for Firebase inline editor. - Copy this code in
functions/package.json
thepackage.json
file in the Dialogflow Cloud Function for Firebase inline editor. - Click
Deploy
cd
to thefunctions
directory- Run
npm install
- Install the Firebase CLI by running
npm install -g firebase-tools
- Login to your Google account with
firebase login
- Add your project to the sample with
firebase use [project ID]
find your project ID here - Run
firebase deploy --only functions:dialogflowFirebaseFulfillment
- Paste the URL into your Dialogflow agent's fulfillment and click
Save
See LICENSE.md.