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

Looks like I requested too many OTPs #2605

Open
jeffgoldszer opened this issue Oct 8, 2024 · 9 comments
Open

Looks like I requested too many OTPs #2605

jeffgoldszer opened this issue Oct 8, 2024 · 9 comments

Comments

@jeffgoldszer
Copy link

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.

I was logging in successfully but not seeing any devices. I have tried several time each time requiring a login. Currently, after I submit my login credentials, I get options on how I want to get my otp. When I pick one, I am immediately ask for my email address. Consequently, amazon will not text an opt to my cell phone number. When I login into amazon I need to use the authentication app.

To Reproduce

I really don't know how to reproduce this. I am guessing login some amount of times. I can show you the behavior.

Expected behavior

Screenshots

Recording.2024-10-08.133443.mp4

System details

  • Home Assistant version:
  • alexa_media version (from const.py or HA startup log):
  • alexapy version (from `pip sh
    image
    image

ow alexapy` in homeasssistant container or HA startup log):

  • Is Amazon 2FA/2SV enabled <!---We will not debug login issues if unanswered---> (y/n):
  • Amazon Domain:

Debug Logs (alexa_media & alexapy)
Please provide logs.

Additional context

@kizzera
Copy link

kizzera commented Oct 8, 2024

+1

@danielbrunt57
Copy link
Collaborator

AMP cannot use that sequencing of windows to log into your account. It can only handle a first window with email+password on same screen followed by the OTP window with its app generated OTP prefilled. Your sequence has an additional options window to select the type of OTP and that will never work with the AMP proxy login as it will return to AMP after that window with a login failed result code and AMP then sends you back to the beginning page again.
You need to change your Amazon account to only use OTP via app

@jeffgoldszer
Copy link
Author

jeffgoldszer commented Oct 8, 2024

AMP cannot use that sequencing of windows to log into your account. It can only handle a first window with email+password on same screen followed by the OTP window with its app generated OTP prefilled. Your sequence has an additional options window to select the type of OTP and that will never work with the AMP proxy login as it will return to AMP after that window with a login failed result code and AMP then sends you back to the beginning page again. You need to change your Amazon account to only use OTP via app

Hey Daniel. I hope this response finds you and your family well. Thank your for your response. I am not sure what you mean by the sequencing of windows? I realize that AMP only accepts credentials from the form that prompts both email and password. However, The initial login form only contains a prompt for the email followed by an additional prompt for the password. In order to get the form containing both, the user has to create and existing account and then select the button to login.

After that AMP prompts for the OTP. Because I reconfigured a certain amount of times, Amazon is not sending me a text containing the OTP. After the login screen it is giving me 3 choices to get the OTP and AMP does not know how to handle it.

I am not sure what you mean by "You need to change your Amazon account to only use OTP via app"? My Amazon security is set up for 2FA where the Authenticator can be used. If that were not the case I could not have got this far.

@danielbrunt57
Copy link
Collaborator

danielbrunt57 commented Oct 8, 2024

Why is Amazon giving you 3 choices to get the OTP? It's not AMP doing that as all of those login screens are provided from Amazon. Your Amazon security should be set up for 2SV only via Authenticator App and other options should never be an option! AMP was never written to handle anything else when OTP/2SV is configured.

@jeffgoldszer
Copy link
Author

I am not sure why. I can tell you that my alexa devices were not being discovered. So i would uninstall AMP and install it again. I am guessing that Amazon has a maximum otp per day that it will text to a cell phone. When I login into my Amazon account, Amazon will not text me a otp. So, I have to ask for another way to get the OTP. It gives me the options, Text me, Call me or use the Authenticator App. Text me does not work, I have not tried option 2 and so I use the Authenticator App. You can see the same options are offered in the video, It just with Amp, it does not prompt for the OTP code.

@danielbrunt57
Copy link
Collaborator

danielbrunt57 commented Oct 8, 2024

I am not sure why. I can tell you that my alexa devices were not being discovered. So i would uninstall AMP and install it again. I am guessing that Amazon has a maximum otp per day that it will text to a cell phone. When I login into my Amazon account, Amazon will not text me a otp. So, I have to ask for another way to get the OTP. It gives me the options, Text me, Call me or use the Authenticator App. Text me does not work, I have not tried option 2 and so I use the Authenticator App. You can see the same options are offered in the video, It just with Amp, it does not prompt for the OTP code.

AMP CAN NOT USE A TEXTED OTP CODE! YOU NEED TO PROVIDE THE OTP SECRET IN THE AMP CONFIG SETUP!

@jeffgoldszer
Copy link
Author

I think that is partially right. The Amp installation form only accepts a Authentication App Secret key. But when AMP ask me to login, the OTP was texted to me.

@danielbrunt57
Copy link
Collaborator

danielbrunt57 commented Oct 9, 2024

I think that is partially right. The Amp installation form only accepts a Authentication App Secret key. But when AMP ask me to login, the OTP was texted to me.

AMP did not ask you to login, Amazon did. The OTP via SMS is useless to AMP. AMP needs to generate its own OTP via the OTP secret and verify that it works to be able to use it to log in and relog in in the future.

@danielbrunt57 danielbrunt57 changed the title Looks like I requested too many otps Looks like I requested too many OTPs Oct 9, 2024
@bamzero
Copy link

bamzero commented Oct 27, 2024

This seems reminiscent of an earlier problem I had though I don't remember if it would get to the OTP stage but from memory the workaround was instead of choosing Sign in, choose Create new account but use the same email and when it says account already exists continue and it would work ok.

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

No branches or pull requests

4 participants