question

milliesoftmartin avatar image
milliesoftmartin asked

Using Amazon OAuth?

There's a post from Justin in the KB section about what to do if your home automation device doesn't support OAuth; https://forums.developer.amazon.com/forums/thread.jspa?threadID=8569&tstart=0 Basically it says you can use Amazon OAuth. But I'm struggling to figure out how. I need to get a username and password from users to link to the Vera, and I did this by setting up my own OAuth server which stores the credentials. How can I use the Amazon one to do that instead? Martin
10 |5000

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

memo@amazon avatar image
memo@amazon answered
Hi, Please take a look at the following blog post for some tips on how to implement LWA: - https://developer.amazon.com/public/community/post/TxNL8HYBBE7YTE/Tips-for-Using-Login-with-Amazon-in-Alexa-Connected-Home-CoHo-Skills
10 |5000

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

milliesoftmartin avatar image
milliesoftmartin answered
That shows you how to set up Login with Amazon, but that's not the question. Once you have it set up, you know that the person's Amazon login is john.smith@example.com, but you don't know the username and password of the system they are trying to connect to. My question is do you then hard code the HA system's username and password in your code, or is there some technique for storing it on the Login with Amazon servers that I'm not aware of? Martin
10 |5000

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

milliesoftmartin avatar image
milliesoftmartin answered
An update for anyone who is interested in using Login With Amazon - it simply doesn't work with Alexa Connected Home. It won't authenticate, and there is no way to find out why - you have no access to logs, and Amazon ignore all requests for help in investigating why. Avoid it and use your own OAuth server instead. Martin
10 |5000

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

memo@amazon avatar image
memo@amazon answered
Hi milliesoftmartin , Implementing LWA isn't a alternative to implementing Oauth server, but rather an alternative to an OAuth portal. In this case, since the Vera doesn't support Oauth natively, implementing your own server is the only option when implementing account linking. Thanks,
10 |5000

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

Danny avatar image
Danny answered
Requiring us to setup a oAuth server is a huge barrier, especially for projects that are not intended to be for a mass audience.
10 |5000

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