alandtse / alexa_media_player

This is a custom component to allow control of Amazon Alexa devices in Home Assistant using the unofficial Alexa API.
Apache License 2.0
1.51k stars 289 forks source link

Install Integration: HA auth link loop #2527

Closed jj-uk closed 1 month ago

jj-uk commented 1 month ago

IMPORTANT: Please search the issues, including closed issues, and the FAQ before opening a new issue. The template is mandatory; failure to use it will result in issue closure.

Describe the bug

When installing the alexa media player integration, the last step is to open amazon login page from the local HA instance. After entering the amazon email address, the password page is show. After entering the password, the email address page is shown and the loop occurs forever.

The address is: http://192.168.1.10:8123/auth/alexamedia/proxy?config_flow_id=__REMOVED_ID__&callback_url=http://192.168.1.10:8123/auth/alexamedia/callback?flow_id%3D__REMOVED_ID__

I've removed the ID as i'm not sure if it's safe to post here. Replaced with __REMOVED_ID__ To Reproduce

  1. Add integration -> Alexa media player
  2. enter: amazon,co.uk valid email valid amazon password Newly generated 2FA app key http://192.168.1.10:8123 public url blank inc devices blank exc devices blank 60 1.5 inc devices via echo unchecked advanced debuggin unchecked.
  3. Submit.
  4. Enter the generated OTP into amazon, tick the confirmation box in HA and continue.

At this point, the internal URL opens: http://192.168.1.10:8123/auth/alexamedia/proxy?config_flow_id=__REMOVED_ID__&callback_url=http://192.168.1.10:8123/auth/alexamedia/callback?flow_id%3D__REMOVED_ID__

and the loop begins: email address -> password -> email address -> etc..

Expected behavior

Successful integration install.

Screenshots

System details

Debug Logs (alexa_media & alexapy) Please provide logs. As setup fails, there's no method to enable logging, that I can find? Additional context

bennydente commented 1 month ago

Hi, same here on amazon.it. Bye.

CookieRacer commented 1 month ago

Hi, same here on amazon.de :-(

This workaround help me too :-) https://github.com/alandtse/alexa_media_player/issues/2514#issuecomment-2345070532

Inferis1305 commented 1 month ago

there is a workaround ...

_" Through trial and error trying to figure out the flow sequence, I was able to trick it and get to the OTP window. After you've cycled through name, password and back to name, select the option Create Account New to Amazon? Fill in a first & last name (anything at all as not going to matter so "Q W" is quick and easy to type!) Amazon will then inform you that an account with your email already exists. At that point re-select "Sign in Already a customer?" and proceed with the email and password windows and then the OTP window should appear. By that point though, the integration generated OTP has likely expired but you can just enter your current app generated OTP code and it should work. If it returns to the integration add window and it just sits and spins and never progresses, that likely means the proxy listening session has expired and you'll have to repeat the process."

Enjoy

CookieRacer commented 1 month ago

there is a workaround ...

_" Through trial and error trying to figure out the flow sequence, I was able to trick it and get to the OTP window. After you've cycled through name, password and back to name, select the option Create Account New to Amazon? Fill in a first & last name (anything at all as not going to matter so "Q W" is quick and easy to type!) Amazon will then inform you that an account with your email already exists. At that point re-select "Sign in Already a customer?" and proceed with the email and password windows and then the OTP window should appear. By that point though, the integration generated OTP has likely expired but you can just enter your current app generated OTP code and it should work. If it returns to the integration add window and it just sits and spins and never progresses, that likely means the proxy listening session has expired and you'll have to repeat the process."

Enjoy

Yes thank you the workaround help me. Also here https://github.com/alandtse/alexa_media_player/issues/2514#issuecomment-2345070532

jj-uk commented 1 month ago

Ok, this issue seems to be a duplicate of #2514.

bennydente commented 1 month ago

thanks, workaround help me too.

danielbrunt57 commented 1 month ago

Duplicate issue. See https://github.com/alandtse/alexa_media_player/issues/2514 ...