only create cookie when not existed.
All checks were successful
Deploy / Build (push) Successful in 5m29s
All checks were successful
Deploy / Build (push) Successful in 5m29s
This commit is contained in:
parent
1ba9de15c4
commit
fe704cb359
@ -95,10 +95,15 @@ void Application::authEvent() {
|
||||
}
|
||||
}
|
||||
setInternalPath("/", true);
|
||||
|
||||
auto app = Amass::Singleton<WebToolkit::Server>::instance();
|
||||
auto &service = app->authService();
|
||||
Wt::Http::Cookie cookie(service.authTokenCookieName(), service.createAuthToken(u));
|
||||
setCookie(cookie);
|
||||
auto &env = environment();
|
||||
auto token = env.getCookie(service.authTokenCookieName());
|
||||
if (token == nullptr) {
|
||||
Wt::Http::Cookie cookie(service.authTokenCookieName(), service.createAuthToken(u));
|
||||
setCookie(cookie);
|
||||
}
|
||||
} else {
|
||||
m_loginPage = m_navigationBar->removeLoginItem();
|
||||
LOG(info) << "User logged out.";
|
||||
|
Loading…
Reference in New Issue
Block a user