Auth::AuthWidget throws
Added by Christian Meyer about 2 years ago
Hello
I am at a loss, and have no idea how to get started on a solution.
I am trying to implement Authentication, and I am closely following the Auth Tutorial and the examples with the setup.
Now the First thing I see, when Navigating to the App is the Login Window... just as Expected
Calling Register New opens a Dialog, also expected.
If I enter an invalid username, e.g. too short: the Validator fires and tells, as it should.
If I then enter a longer name and navigate to the next Field, my Application breaks.
Debugger stops in some thread file that vscode can't open: pthread_create.c
from glibc
apparently.
The Same happened after I migrated to IdentityPolicy::EmailAddress
as long as the email is invalid, the widget works
Once the first Field of RegistrationView is Validated, the App breaks.
I am using Wt 4.6.1 on Ubuntu 20.04 LTS
Does anyone have a clue as to what could be the reason for this?
// This is how I call it
auto authWidgetPtr = std::make_unique<Wt::Auth::AuthWidget>(
DboSession::AuthSession::auth(), getAuthSession()->users(), getAuthSession()->login()
);
authWidget = authWidgetPtr.get();
authWidget->model()->addPasswordAuth(&DboSession::AuthSession::passwordAuth());
authWidget->model()->addOAuth(DboSession::AuthSession::oAuth());
authWidget->setRegistrationEnabled(true);
authWidget->processEnvironment();
root()->addWidget(std::move(authWidgetPtr));
Thank you for your time
Replies (2)
RE: Auth::AuthWidget throws - Added by Christian Meyer about 2 years ago
Oh some other things that might be important:
Wt and Project are both compiled for c++17
with CXX_STANDARD=17
and any implementation is set to WT_ANY=thelink2012
[SOLVED]: Auth::AuthWidget throws - Added by Christian Meyer about 2 years ago
Sorry ... my fault for the Segfault ...
Forgot to initialize UserDatabase
works as it should =)
Thank you anyway =)