-
Notifications
You must be signed in to change notification settings - Fork 37
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
SMS Authenticator - Resend code flow and avoid sending with refresh page button. #157
Comments
Were you able to find a solution for the SMS "DDoS" situation (the refreshing to keep getting SMS') ? |
I still use the method explained at the end of the opening post. One can also store the last time a code has ben generated, or use other strategies, but I wish an official method could be implemented. |
Can you send your used code/the parts that you modified ? @Mizar01 |
Sorry, I switched to another project... PhoneValidationRequiredAction.java
....
` On SmsAuthenticator
This is the essential parts I modified. You need to add further configuration variables in order to manage them from the realm console, and add the relevant part of the timed resend button in login-sms.ftl. PS : I don't know why SmsAuthenticator code is mangled when rendered in this editor. |
Sometimes the users do not receive the text in their phone and they need to have a resend code button.
I discovered that this is simply done by refreshing the page (well, if no other 2fa method takes priority).
But this also raise a problem. We pay for the sms texts, and we don't want people to click compulsively on the refresh button or the 'resend code' button.
What could be the best approach to allow resending without this risk?
I thought about counting the retries and store this number in session. After a successful code matching, the counter is reset to zero. If the counter reaches the limit, I have to show a message telling the user he cannot retry further.
The text was updated successfully, but these errors were encountered: