question

supergeek133 avatar image
supergeek133 asked

Integration with 3-legged oauth

Hey all, Trying to think through how to build an integration with a set of devices that require 3-legged oauth. Say I ask Echo "Setup [invocation name]" - Redirect to the web app, add userid as a query parameter to my generated link - Click link that stores userId in a state, and redirects to the 3rd party login flow with the state assigned - Login/authorization code comes back with state - Associate amazon account with tokens/userID for 3rd party system Then once an utterance comes in, I can lookup by Amazon UserId? Thoughts?
alexa skills kitdebugging
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jjaquinta avatar image
jjaquinta answered
>Redirect to the web app Not sure I'm following you here. (No pun intended.) Alexa can't redirect anything anywhere. The card displayed is plain text. You can print a URL on it, but they are going to have to cut & paste it, or tediously copy it by hand. Not good usability if you are going to embed something complicated like the user ID. Your skill can certainly call to a web app. But... >Click link that stores userId in a state You seem to be talking about a user and a browser again. Not a programmatic link. My general recommendation to link an Alexa skill to web site is to do something like Firefox sync. Make up a 4 digit code unique to that user ID, store it in your back end database, and verbally repeat it to the user along with a simple URL to your web site. On the web site, ask them to login and enter the 4 digit code. Consult your back end database and make the connection. I describe that in a little more detail in my book ( http://www.amazon.com/How-Program-Amazon-Echo-Development-ebook/dp/B011J6AP26 ) but that's the gist of it.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Nick Gardner avatar image
Nick Gardner answered
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.