bbindreiter / node-red-contrib-alexa-remote2-applestrudel

Node-Red Nodes for interacting with Alexa
https://flows.nodered.org/node/node-red-contrib-alexa-remote2-applestrudel
MIT License
74 stars 20 forks source link

Authentication of Alexa account not possible #143

Closed tiko2302 closed 8 months ago

tiko2302 commented 9 months ago

Good evening,

I tried to authenticate my alexa account via proxy opening localhost:3456. I only get a page where I can scan a QR code in order to open the alexa app. If I scan this QR code I am redirected to HomeAssistant.

As this is not working I tried to use authentication by cookie. I followed the instructions given by get-cookie.md and obtained ac cookie. When I pasted it into the cookie field of the Alexa node I got "Authentication failed: no body".

How can I solve this? As Amazon tries to enforce usage of the Alexa app and will reduce funtionality of alexa.amazon.com how will authentication look like in the future?

Best wishes!

teixeirarg commented 9 months ago

same with me

JoranJix commented 9 months ago

Same problem here

4ULAB commented 8 months ago

Hello everyone, I noticed a problem on the fork node-red-contrib-alexa-remote2-applestrudel if you log in again the alexa web login page is no longer available, it has been removed by amazon. Do you have any news on how to fix it?

Matten-Matten commented 8 months ago

Hey, denke das das eher ein issues für Alexa-remote ist und das eher @Apollon77 beantworten kann.

Gruß Matten Matten

4ULAB commented 8 months ago

Hey, denke das das eher ein issues für Alexa-remote ist und das eher @Apollon77 beantworten kann.

Gruß Matten Matten

Thanks for the reply, the web page used for proxy authentication has no longer been available for a few weeks and I have not read anyone who has reported this problem. At this point I can no longer log in to different accounts and I don't know how to resolve it. It seems that Amazon has removed the Alexa login web page.

Matten-Matten commented 8 months ago

It's best to open an issue in alexa-remote and we'll see if @Apollon77 can find a solution.

The community behind it is very large, as alexa-remote is used in some smart home solutions.

greeting Matten Matten

4ULAB commented 8 months ago

It's best to open an issue in alexa-remote and we'll see if @Apollon77 can find a solution.

The community behind it is very large, as alexa-remote is used in some smart home solutions.

greeting Matten Matten

Thanks, i open a issue now.

Matten-Matten commented 8 months ago

FYI, I just logged in again with the Alexa app and the login page looks like the website before. Maybe something just needs to be changed so that the login doesn't recognize a PC but a mobile device, but these are just guesses.

4ULAB commented 8 months ago

FYI, I just logged in again with the Alexa app and the login page looks like the website before. Maybe something just needs to be changed so that the login doesn't recognize a PC but a mobile device, but these are just guesses.

I used several computers for these tests, but when I type localhost:3456 this screen with QR code always appears and there are no forms for login with username and password. So I can't log in with a new account.

Screenshot (2)

Matten-Matten commented 8 months ago

Which version of node-red-contrib-alexa-remote2-applestrudel are you using?

4ULAB commented 8 months ago

Which version of node-red-contrib-alexa-remote2-applestrudel are you using?

5.0.43, the problem in my opinion is that amazon has changed the login page and now it is no longer possible to login from web browser which used to be from the alexa.amazon.it page

Matten-Matten commented 8 months ago
Auth Method : Proxy

 This IP : 192.168.178.23

 Port : 34567

 File Path 

 Refresh : 3 days

 Auto Init : On

 Events : On

 Service Host : layla.amazon.de

 Push Dispatch Host 

Optional  Page : amazon.de

 Language 
de-DE

"On" Keyword 

Optional  User Agent 

This is what my settings look like. it works there...

At first I didn't dare to log in again in nodered, but now I tested it and the previous login page appears and after logging in the well-known "Amazon Alexa Cookie successfully retrieved. You can close the browser."

4ULAB commented 8 months ago
Auth Method : Proxy

 This IP : 192.168.178.23

 Port : 34567

 File Path 

 Refresh : 3 days

 Auto Init : On

 Events : On

 Service Host : layla.amazon.de

 Push Dispatch Host 

Optional  Page : amazon.de

 Language 
de-DE

"On" Keyword 

Optional  User Agent 

This is what my settings look like. it works there

These are the settings on my computer and it works here because I logged into amazon a few months ago. So on this computer no problem because the cookie was captured and stored on the authorization file inside the nodered folder. If you try to log in again with a different account, when you type localhost:3456 the page that appears for the amazon login is different from the one that appeared a few months ago , there are no longer fields to enter username and password.

Screenshot (3)

Matten-Matten commented 8 months ago

I think I've found the problem. Please enter the device IP not "localhost" then it should work.

with localhost:3456 I also get the wrong login page

greetings matten

4ULAB commented 8 months ago

I think I've found the problem. Please enter the device IP not "localhost" then it should work.

with localhost:3456 I also get the wrong login page

greetings matten

you are a great person! :) this is solved.

if i use local host i get the error "Proxy-Error: Error: getaddrinfo ENOENT www.amazon.com"

if i use 127.0.0.1:3456 this work again!

Thanks a lot!

Matten-Matten commented 8 months ago

Top! Then put the solution in the other issue and close both.

greeting matten

Matten-Matten commented 8 months ago

By default the settings say localhost, this will have to be changed to 127.0.0.1 in the future.

tiko2302 commented 8 months ago

Hey @Matten-Matten and @Mirco980,

I tried what you discussed and I also get the correct login page where I can enter my email and my password. After that I also get the verification SMS and can enter the verification code. If I submit it I get forwarded to

http://my-ip:34567/www.amazon.com/404

and cannot complete the verification. Did anyone of you had the same problem in the beginning?

4ULAB commented 8 months ago

Hey @Matten-Matten and @Mirco980,

I tried what you discussed and I also get the correct login page where I can enter my email and my password. After that I also get the verification SMS and can enter the verification code. If I submit it I get forwarded to

http://my-ip:34567/www.amazon.com/404

and cannot complete the verification. Did anyone of you had the same problem in the beginning?

Sorry, I disabled the 2 step verification and the method with the ip address (not loacalhost) work fine now.

tiko2302 commented 8 months ago

TL;DR: Changing localhost to the ip where your node-red/homeassistant is running (thanks to @Matten-Matten) and using 2FA with an Authenticator (instead of Amazon sms) solved it for me.

Interestingly I tried to deactivate 2FA and found out that I had never activated it and Amazon just sent me those confirmation emails by themselves. I then proceeded to actively activate it. After I did I tried to authenticate my account again and got the message that the cookie was obtained. I do not know why but this time it seemed to work. So changing from localhost to the IP and then actively activating 2FA solved the problem for me.