-
Notifications
You must be signed in to change notification settings - Fork 29
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
Fix Login OTP #199
Fix Login OTP #199
Conversation
Added OTP check Changed because the username was no longer displayed on the OTP screen.
|
I will send you a screenshot and the error. Error message:
I'm accessing this from Japan, but it may be different overseas. Is it better to add a check if "span.userAccount" exists? |
That's interesting, based on the message I guess it has to do if whether you set up 2FA on your account? Either way I think the message needs to change then. Probably what we should do is capture the text of |
Branch by identifying two types of authentication applications and email transmissions.
Sorry, I checked the NicoNicohelp again and it says it right.... There was a way to verify the OTP code via the authentication app and email. (I thought it was only app authentication) After confirming the migration of the 2-step verification page, I changed the message to confirm the code from the email if 'span.userAccount' is available and from the authentication app if not. Please let me know if there is a smarter way to write this. I verified and confirmed three authentication patterns. |
If you can, change the two URL checks to use from urllib.parse import urlparse
[...]
parsed_login_request_url = urlparse(login_request.url)
if "message=cant_login" in parsed_login_request_url.query:
raise AuthenticationException("Incorrect email/telephone or password. Please verify your login details")
if parsed_login_request_url.path == "/mfa":
otp_code_request = session.get(login_request.url)
[...] Thanks for investigating! |
Check the redirect URL and see if the OTP is valid.
Changed because the username was no longer displayed on the OTP screen.