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

ValidateTwoFactorPin always returns false, if the secretKey parameter is base32 encoded string #65

Closed
ghost opened this issue Jul 7, 2021 · 1 comment

Comments

@ghost
Copy link

ghost commented Jul 7, 2021

ValidateTwoFactorPin always returns false, if the secretKey parameter is base32 encoded string. It happens because this parameter is always converted to a byte array in the GenerateHashedCode method using Encoding.UTF8.GetBytes method.
In the case of base32 encoded string, we need to use the method Base32Encoding.ToBytes.

ghost pushed a commit to kateryna-novak/GoogleAuthenticator that referenced this issue Jul 7, 2021
…the secretKey parameter is base32 encoded string - fixed

Fix for issue # 65;
Support for .net5;
Small refactoring.
ghost pushed a commit to kateryna-novak/GoogleAuthenticator that referenced this issue Jul 7, 2021
…f the secretKey parameter is base32 encoded string

Added parameter secretIsBase32 into ValidateTwoFactorPIN
ghost pushed a commit to kateryna-novak/GoogleAuthenticator that referenced this issue Jul 8, 2021
…the secretKey parameter is base32 encoded string - fixes for review
ahwm added a commit that referenced this issue Jul 9, 2021
Issue #65  ValidateTwoFactorPin always returns false, if the secretKey parameter is base32 encoded string - fixed
@ahwm
Copy link
Collaborator

ahwm commented Jul 9, 2021

Addressed in #66

@ahwm ahwm closed this as completed Jul 9, 2021
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

1 participant