Hi!
I don't think this implementation is working. Let me explain:
- register
- login
- generate qr (read it with the app, etc)
- log out
then:
- login
- open up the google auth app
- sent the request with the code to
/2fa/authenticate, it will every time throws the
WrongAuthenticationTokenException()
in the middleware.
And the reason for that is the following:
this condition:
!omitSecondFactor &&
user.isTwoFactorAuthenticationEnabled &&
!isSecondFactorAuthenticated
will always evaluate to True because where this value: isSecondFactorAuthenticated should be flagged to true, the function never reaches, because we are keep getting that error i just mentioned above.
This Truevalue of that variable being set in the createToken method (the 2nd parameter, which is set to false by default), However, it's being called with true, in the secondFactorAuthentication method, BUT we are never getting there as mentioned above.
Hi!
I don't think this implementation is working. Let me explain:
then:
/2fa/authenticate, it will every time throws thein the middleware.
And the reason for that is the following:
this condition:
will always evaluate to
Truebecause where this value:isSecondFactorAuthenticatedshould be flagged to true, the function never reaches, because we are keep getting that error i just mentioned above.This
Truevalue of that variable being set in thecreateTokenmethod (the 2nd parameter, which is set to false by default), However, it's being called with true, in thesecondFactorAuthenticationmethod, BUT we are never getting there as mentioned above.