问题
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