My action was working fine but suddenly is infinite looping on askForSignIn.
Here's the block of code I'm using in express:
const ActionsSdkApp = require("actions-on-google").ActionsSdkApp;
router.post("/googleHome", (req, res) => {
const app = new ActionsSdkApp({ request: req, response: res });
if (!app.getUser().accessToken) {
console.log("ask for sign in");
app.askForSignIn();
} else {
console.log("signed in");
app.tell("signed in");
}
});
If I run this, I get "ask for sign in" in my console about every second until google home times out. When I take out the app.askForSignIn() and just leave app.tell("signed in"), everything works fine.
I have "fulfillmentApiVersion": 2 in my action.json file and account linking set up on the action. Running "actions-on-google": "^1.10.0". I do not have transactions enabled as this is a response to the main intent. Our action can't be used without account login. Any suggestions? Just baffled as to why this was working fine earlier (it even passed Google's publishing requirements) and it suddenly stopped working.
My action was working fine but suddenly is infinite looping on askForSignIn.
Here's the block of code I'm using in express:
If I run this, I get "ask for sign in" in my console about every second until google home times out. When I take out the
app.askForSignIn()
and just leaveapp.tell("signed in")
, everything works fine.I have
"fulfillmentApiVersion": 2
in my action.json file and account linking set up on the action. Running"actions-on-google": "^1.10.0"
. I do not have transactions enabled as this is a response to the main intent. Our action can't be used without account login. Any suggestions? Just baffled as to why this was working fine earlier (it even passed Google's publishing requirements) and it suddenly stopped working.