I have the integration between AWS Alexa Skill, Auth0, and Facebook working and can see the JSON that is being stored as raw JSON by Auth0 for my test user, but I’m having trouble finding code samples on how to get access to the JSON attributes inside the Alexa skill.
Specifically, I want the name and email of the user (which I can see in the JSON). Can anyone point me in the direction of the API or ideally a sample of what I need to do to access them?
I’m setting the Alexa skill up using node.js (hosted mode).
There are a few options for getting the user’s profile information. When the user authenticates, the application is issued an Access Token and ID Token.
You could decode the ID Token using a JWT verification library (example ID token) or you can use the Access Token to retrieve profile information using the Authentication API.
If you are using the NodeJS passport-auth0 package, then you can follow the QuickStart’s example to access the profile information from req.user.