0
votes

I am facing this issue in integrating Google SignIn flow. The problem I am facing is that after the user successfully sign in program control trigger actions_intent_SIGN_IN intent in the code. From where I can get user details but I am noticing that sometimes conv->user->profile doesn't have the profile information while other time it has. Also When it doesn't have profile information, next time when I invoke some other intent it gets the user token.

This is the Payload I am getting on SignIn Intent.

User {
   raw: 
    { userStorage: '{"data":{}}',
      lastSeen: '2018-10-04T11:17:50Z',
      locale: 'en-US',
      userId: 'XXXXXXXXXXXX' },
   storage: {},
   _id: 'XXXXXXXXXXXXXXXXXXXX',
   locale: 'en-US',
   permissions: [],
   last: Last { seen: 2018-10-04T11:17:50.000Z },
   name: Name { display: undefined, family: undefined, given: undefined },
   entitlements: [],
   access: Access { token: undefined },
   profile: Profile { token: undefined }
 }

As we can see under the profile section token and payload fields should be present. But most of the times it gets missing. Does anyone knows how to fix this ?

1
I believe downvoting should be with a comment. People don't understand the question and just downvote it.Ajit Singh
This does seem odd. Can you update your question with the answer to the following: What language are you using to develop your code in, and what library are you using? Can you update the question with the code you're using to show this part of the request? Can you show the entire request object or request JSON?Prisoner
Have you see this issue on multiple Google Assistant surface types (smartphone, smart speaker, smart display)? Or is it only with smart speakers like Google Home? Have you seen the issue when using the Actions SDK (no Dialogflow) or only when using Dialogflow?Chris Madden

1 Answers

0
votes

Did you try checking whether sign-in is successful with

app.intent('actions_intent_SIGN_IN', (conv, params, signin) => {
if (signin.status === 'OK') {
    //do something
    }
}