public boolean validSecondFactor ( String secret , String number ) { Objects . requireNonNull ( secret , Required . SECRET . toString ( ) ) ; Objects . requireNonNull ( number , Required . TOTP . toString ( ) ) ; return TotpUtils . verifiedTotp ( secret , number ) ; }
Checks if a given number for 2FA is valid for the given secret