m-henderson / InstagramApiSharp

A complete Private Instagram API for .NET (C#, VB.NET).
Other
1 stars 0 forks source link

BUG - Login error with Two factor authentication #4

Open tommasoceschia opened 5 years ago

tommasoceschia commented 5 years ago

I've:

Issue category

Language

Usage

Operating System

Describe your issue

Hi Man, I'm glad to see that someone wants to continue this important project. There is a bug in the login procedure for users that has the Two factor authentication enabled. When the challenge is not required everything is ok: the response of the API is "Two factor required", the TwoFactorInfo are populated and the user can send the verification code and login successfully. But if the challenge is required... you send the verification code for the callenge... then IG automatically send you the code for the TwoFactor Auth but the API reads it as another Challenge required... so it responds with "Challenge required" and populate the info only for the challenge... If you send the two factor code as Challenge obviously it fails... and If you force the code to be sent as TwoFactor the TwoFactor info object is null and it throws an exception. I hope I was clear. Thank you in advance. Tom

ghost commented 5 years ago

I have the same problem!