devise-otp
devise-otp copied to clipboard
Incorrect error message when entering valid token after entering invalid token
devise 4.9.4 devise-otp 0.7.1
Steps to reproduce:
- Log into site using username/password.
- Enter incorrect token value and press "Submit Token".
- Receive an error message
The token you provided was invalid.
and be redirected back to token entry page. - Enter a valid token value and press "Submit Token".
- Be successfully logged in, but still get error message
The token you provided was invalid.
This occurs each time after entering an invalid token, then subsequently entering a valid token. Once you have logged into the application, the error message displays. Navigating to another page in the application without logging out causes the error message to disappear, so it is only happening after the initial failed and subsequent successful token login.