I have integrate auth0 to authenticate user in my google assistant application using https://auth0.auth0.com/
Account Linking is working fine. I have received one access token after account linking in assistant in request like below :
{
"responseId": "............",
"queryResult": {
"queryText": "GOOGLE_ASSISTANT_WELCOME",
"action": "input.welcome",
"parameters": {
},
"allRequiredParamsPresent": true,
"fulfillmentText": "Hi! How are you doing?",
"fulfillmentMessages": [
{
"text": {
"text": [
"Hi! How are you doing?"
]
}
}
],
"outputContexts": [
.................
],
"intent": {
"name": "...........",
"displayName": "Default Welcome Intent"
},
"intentDetectionConfidence": 1,
"languageCode": "en"
},
"originalDetectIntentRequest": {
"source": "google",
"version": "2",
"payload": {
"user": {
"accessToken": "w8S-ffdFLBCiddyxfsFxKPp3y4FJJoLD2",
"locale": "en-US",
"lastSeen": "2019-08-05T12:54:38Z",
"userVerificationStatus": "VERIFIED"
},
"conversation": {
"conversationId": "ABwppHHTjRvYEzK57U3fKGC-nomnMOTUL5l3rtt9rF2_kXxwV-UwKquki278m4FwcWdM0hQ-48zVZyhCvLw",
"type": "NEW"
},
"inputs": [
{
"intent": "actions.intent.MAIN",
"rawInputs": [
{
"inputType": "KEYBOARD",
"query": "Talk to my device"
}
]
}
]
"session": "projects/quizeapp-8a899/agent/sessions/ABwppHHTjRvYEzK57U3fKGC-nomnMOTUL5l3rtt9rF2_kXxwV-UwKquki278m4FwcWdM0hQ-48zVZyhCvLw"
}
There is one access token in payload
"user": {
"accessToken": "w8S-ffdFLBCiddyxfsFxKPp3y4FJJoLD2",
"locale": "en-US",
"lastSeen": "2019-08-05T12:54:38Z",
"userVerificationStatus": "VERIFIED"
}
I need to extract logged in user email ID from this access token.
Do anyone have idea how can I achieve this?