mirror of
https://github.com/netbirdio/netbird.git
synced 2026-09-30 10:39:08 +02:00
[client] Route expired-session dialog to full re-login instead of extend
After session expiry the engine is torn down permanently (PermissionDenied -> runCancel), so the extend flow can never succeed and the SSO round trip was wasted before failing with "engine is not initialised". Route the expired dialog's action to the trigger-login flow that rebuilds the client, and fail RequestExtendAuthSession before opening the browser when the engine is already gone.
This commit is contained in:
@@ -1798,6 +1798,9 @@ func (s *Server) RequestExtendAuthSession(
|
||||
if connectClient == nil {
|
||||
return nil, gstatus.Errorf(codes.FailedPrecondition, "client is not running")
|
||||
}
|
||||
if connectClient.Engine() == nil {
|
||||
return nil, gstatus.Errorf(codes.FailedPrecondition, "session can no longer be extended, log in again to reconnect")
|
||||
}
|
||||
|
||||
hint := ""
|
||||
if msg.Hint != nil {
|
||||
|
||||
Reference in New Issue
Block a user