0

I am using Account Linking with OAuth - Authorization type in DialogFLow and added it for one of the Intent(lets say Intent name is Secret).

When I tested it for first time in test simulator, it did ask for sign-in and sign-in was successful.

From second time, it is not asking for any sign-in. I am confused on why it is not asking for any sign-in?

For each google/gmail account will the Account linking/sign-in happens only once?

I would like the app to ask for sign-in whenever the user invokes the Secret intent. Can this be done?

John Seen
  • 701
  • 4
  • 15
  • 31

1 Answers1

0

Yes, you need to throw a sign-in request card. Look here.

Bela Vizy
  • 1,133
  • 8
  • 19
  • Thanks for the documentation. But I am really confused on how to implement this. Can you also provide any sample code which asks for sign in, whenever a specific intent is invoked. – John Seen Apr 19 '19 at 04:36
  • If you use programmatic fulfillment, then there is probably an example somewhere. For node.js for instance: https://github.com/actions-on-google/dialogflow-google-sign-in-nodejs/blob/master/functions/index.js – Bela Vizy Apr 19 '19 at 21:19
  • If you work only in Dialogflow, then you need probably a custom payload. Go to your intent responses, click on google assistant, then "add responses". This should be a dropdown of response types. There is no "Link Card", so you have to pick "Custom Payload". On this page, https://developers.google.com/actions/assistant/helpers#json, scroll down to the "Account sign in" part and from the "DIALOGFLOW JSON" tab copy the google: {} section into the custom payload. – Bela Vizy Apr 19 '19 at 21:25