Auth module: handling of wrong password
Added by Simon M over 6 years ago
We use the Auth module as is.
If a wrong password is entered, there's a notification, but the entered password stays in the password field.
Our customer requested, if it's possible to reset the passsword field, if a wrong password was entered.
Is there an out-of-the-box solution for such a behavior?
Thanks.
Replies (2)
RE: Auth module: handling of wrong password - Added by lm at over 6 years ago
I don't think there's anything baked in. You'll need to extend the Wt::Auth::AuthWidget
and maybe extend displayError
or something else and implement your custom logic there. I'm not sure what it's called there, but I did something similar to the Wt::Auth::RegistrationWidget
, and here's code to get the user name widget from thence:
auto t{(Wt::WLineEdit *)resolveWidget("user-name")};
Something similar (though you'll need to know the widget name) should work for Wt::Auth::AuthWidget
. Good luck!
RE: Auth module: handling of wrong password - Added by Simon M over 6 years ago
Thanks, I'll check this out, if this is worth the effort.