actions_intent_SIGN_IN在conv-> user->个人资料下没有个人资料数据 [英] actions_intent_SIGN_IN doesn't have profile data under conv->user->profile

查看:67
本文介绍了actions_intent_SIGN_IN在conv-> user->个人资料下没有个人资料数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在集成Google SignIn流时遇到了这个问题。我面临的问题是,用户成功登录程序控件后,将触发代码中的actions_intent_SIGN_IN意向。从那里我可以获取用户详细信息,但我注意到有时conv-> user->个人资料没有个人资料信息,而其他时候却拥有。另外,当它没有配置文件信息时,下次我调用其他意图时,它将获得用户令牌。

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.

这是我要承受的有效载荷

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我们可以在配置文件部分下看到令牌和有效负载字段。但是大多数时候它会丢失。有人知道如何解决此问题吗?

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 ?

推荐答案

您尝试检查

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

这篇关于actions_intent_SIGN_IN在conv-> user->个人资料下没有个人资料数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆