* Verify if the input code is valid for the given secret * @param secret Base32 encoded secret key * @param inputCode The code entered by the user * @returns boolean indicating if the code is valid
(secret: string, inputCode: string)
| 98 | * @returns boolean indicating if the code is valid |
| 99 | */ |
| 100 | public static verifyTOTP(secret: string, inputCode: string): boolean { |
| 101 | const currentTOTP = this.generateTOTP(secret) |
| 102 | return currentTOTP === inputCode |
| 103 | } |
| 104 | } |
no test coverage detected