diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Engines/Default.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Engines/Default.pm index a5123f49b..d516ca46c 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Engines/Default.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Engines/Default.pm @@ -433,6 +433,7 @@ sub _choice { my $session; unless ( $session = $self->ott->getToken($token) ) { $self->userLogger->info('Token expired'); + $req->noLoginDisplay(1); return $self->p->do( $req, [ sub { PE_TOKENEXPIRED } ] ); } diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/SecondFactor.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/SecondFactor.pm index 8328db79c..d56200f5e 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/SecondFactor.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/SecondFactor.pm @@ -101,7 +101,7 @@ sub _verify { my $session; unless ( $session = $self->ott->getToken($token) ) { $self->userLogger->info('Token expired'); - $self->setSecurity($req); + $req->noLoginDisplay(1); return $self->p->do( $req, [ sub { PE_TOKENEXPIRED } ] ); }