Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add: Support for Retrieving Alexa Account Linking accessToken #37

Merged
merged 1 commit into from
Jan 4, 2016
Merged

Add: Support for Retrieving Alexa Account Linking accessToken #37

merged 1 commit into from
Jan 4, 2016

Conversation

willmanio
Copy link
Collaborator

It's more convenient (and cleaner) to retrieve the accessToken from
request.sessionDetails.accessToken rather than request.data.session.user.accessToken.

I thought about conditionally including the accessToken property, but purposefully setting it to null defines a clear contract and leaves no ambiguity.

If you're unfamiliar with Alexa account linking, see https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/linking-an-alexa-user-with-a-user-in-your-system

It's more convenient (and cleaner) to retrieve the accessToken from
`request.sessionDetails.accessToken` rather than `request.data.session.user.accessToken`.

I thought about conditionally including the `accessToken` property, but purposefully setting it to `null` defines a clear contract and leaves no ambiguity.

See https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/linking-an-alexa-user-with-a-user-in-your-system
@willmanio willmanio changed the title Add: Support for Alexa Account Linking Add: Support for Retrieving Alexa Account Linking accessToken Dec 15, 2015
@willmanio
Copy link
Collaborator Author

I think this is more suitable than PR #35 because you've set a precedent of attaching userId to the response.... we should either simply attach the entire user object or cherry-pick some important properties, but don't do both.

matt-kruse added a commit that referenced this pull request Jan 4, 2016
Add: Support for Retrieving Alexa Account Linking accessToken
@matt-kruse matt-kruse merged commit b5c3f55 into alexa-js:master Jan 4, 2016
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants