actions_intent_SIGN_IN doesn't have profile data under conv->user->profile

北城余情 提交于 2019-12-11 16:48:28

问题


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:


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
    }
}


来源:https://stackoverflow.com/questions/52696012/actions-intent-sign-in-doesnt-have-profile-data-under-conv-user-profile

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!