I am trying account linking for my actions on google using oauth. For the authorization and token url I used auth0 . I am using the Sign in event in my default welcome event but am encountered with an error and it doesn't take me to the sign in page.
Code:
const functions = require('firebase-functions');
const {dialogflow, BasicCard , Image , Button , Suggestions , SignIn} = require( 'actions-on-google');
const app = dialogflow( {
clientId : 'xxxxxxxxxxxxxxxx.apps.googleusercontent.com',
debug : true,
});
});
app.intent('Default Welcome Intent', (conv) =>{
conv.ask(new SignIn("Hello! Welcome"));
})
app.intent("Get Signin",(conv , params, signin) =>{
if(signin.status === 'OK'){
const name = conv.user.name
conv.ask(`Hello ${name}. What can I do for you?`)
conv.ask(new Suggestions(['About'],['Send'],['Receive'],['Check'],['Cancel']));
}
else
{
conv.close("Please sign in to view actions");
}
})