AuthWidget::onLoginChange new session id
Added by Maximilian Kleinert almost 4 years ago
I want to setup some WServer::post connections after an auth event. I connected the signal
as in the Auth2 example. In my authEvent function I create some widgets (on a successful login) and connect them as in the BroadCast example.
Now the problem is that my authEvent is fired before AuthWidget::onLoginChange() gets called. The latter one calls WebSession::generateNewSessionId(), so the old session id was registered for the post event.
How can I enforce that my custom authEvent functions is called after AuthWidget::onLoginChange()?
RE: AuthWidget::onLoginChange new session id - Added by Maximilian Kleinert almost 4 years ago
I derived from Wt::Auth::AuthWidget and have overridden createLoginView(), createLoggedInView() to create/remove the widgets for authenticated users.
This way the session id is already updated when the createLoginView is called.
Is this the right way to do it?