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

Code on login #10

Closed
ts65 opened this issue May 30, 2020 · 8 comments
Closed

Code on login #10

ts65 opened this issue May 30, 2020 · 8 comments

Comments

@ts65
Copy link

ts65 commented May 30, 2020

I'm using this code
auth = audible.LoginAuthenticator( username, password, locale=custom_locale, captcha_callback=custom_captcha_callback, )
to login, but it always asks for "Code: " after solving the captcha. What code ist requested here, where can I find it and is there a way to automatically fill it in or prevent asking for it as I want to use it in an automated script (captcha solver service is working already)? I don't have 2FA set up in amazon and I'm using version 0.2.1 installed via pip

@mkb79
Copy link
Owner

mkb79 commented May 30, 2020

Hi,

ask the app for a "OTP Code: " or "Code: "?

@ts65
Copy link
Author

ts65 commented May 30, 2020

Hi,

"Code: " (login.py line 200)

@mkb79
Copy link
Owner

mkb79 commented May 30, 2020

Okay, then you normally receive a SMS from amazon with a code you have to enter.

If you don’t get one, you can use a workaround. Activate 2FA and login again with captcha and otp code and register a device. Save your registration. Deactivate 2FA.

@ts65
Copy link
Author

ts65 commented May 30, 2020

Thanks! Will try that later (don't get a SMS)

@mkb79
Copy link
Owner

mkb79 commented May 30, 2020

If the app asks for a (cvf verify) code ist means there are some issues with your login requests. It‘s a version of intrusion detection system from amazon. Before I enabled 2FA, it asked me some times for a code (when I played around and test some things). Then I received a SMS on the phone number I stored on amazon.

You can wait now some time and try again. Or enable 2FA, then 2FA replaces the cvf verify system.

@ts65
Copy link
Author

ts65 commented May 30, 2020

Got an email now from amazon with a security code (wasn't the case earlier). Entered this code and login was successfully (next login too). Could you please add a code_callback (or cvf_callback) option (like otp_callback) where I could throw an exception or something so my program doesn't wait for code input but ends with an error if amazon asks for the code again.

@mkb79
Copy link
Owner

mkb79 commented May 30, 2020

I can set this on my todo list. But why you login every time you use this app. You set a register option at LoginAuthenticator init? If you don’t set one, every time you login you will register a device. Please visit amazon and take a look on devices, if so.

To prevent login every time you use this app, save your registration data with the to_file method of your LoginAuthenticator instance after a successfully login. And next time use FileAuthenticator class to load your registration data. So you don’t need to login until you deregister via this app or on amazon page.

@ts65
Copy link
Author

ts65 commented May 30, 2020

Ah, ok. Thanks for the hint, didn't know it a new device was created on login.

Thank you for your help!

@ts65 ts65 closed this as completed May 30, 2020
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

2 participants