What I'm trying to achieve is user authentication (account linking) before the default welcome intent is called.
(I'm aware that in the design documents it is recommended to not require users to authenticate, but it is required for our action)
We have an undeployed action that I have tested in the simulator. The conversation flow is
- The user is prompted to signin ie, new SignIn()
- They are prompted to create an new item
- The item is saved and the user receives a success/fail response and continues
In DialogFlow I have a Default Welcome Intent (prompts the user to create an new item), an intent to capture the item.
Our fulfillment intents
app.intent('ask_for_sign_in_detail', (conv) => {
conv.ask(new SignIn());
});
app.intent('ask_for_sign_in_confirmation', (conv, params, signin) => {
if (signin.status !== 'OK') {
return conv.ask('You need to sign in before using the app.');
}
// const access = conv.user.access.token;
// exchange access.token for jwt from backend
return conv.ask('Great! Thanks for signing in.');
});
app.intent('Default Welcome Intent - fallback', (conv) => {
createItem(conv);
});
In DialogFlow under integrations for the Google Assistant I have required that Sign In is required before the Default Welcome Intent.
When I go to test in the simulator I can see that under account linking there is no information (ie, no accounts linked) and there is a message stating 'No account is linked to Google. Start a test conversation for account linking.'
Starting a conversation I get the following error:
Your voice wasn't recognized, so I can't connect you to Talkatoo. Check the Voice Match settings in the Google Home app.
I am not sure where I have strayed trying to authenticate users with their Google accounts.
This has been fixed by Google as of 2019-07-19 02:57 PDT. Received a response from the AoG team, and tested it in the simulator. It was a Google bug.