Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I did a complete refactoring of the 2fa authentication because of multiple issues I had related to #96.
I was only using yahoo for my tests but I did multiple different tests that also covered the issue desribed in #96. These changes fixes #96 in my opinion.
The issues I had with the existing code was:
Quick description of the refactoring changes:
I did the following tests after having everything fully implemented:
I did make some changes to the code like instead of using imaplib's search function to find all mails from [email protected], I changed to get all mail ids and check the sender of the last 10 mails. The reason being that the search function did not return all mails from [email protected]. The search function does not work if there's more than 10K mail ids - at least not with yahoo.