[android] dismiss the SSH auth browser once the token arrives

The JWT device-code flow opened the verification URL through the URL
opener but never told it the round-trip had finished, so the Custom Tab
stayed in front of the terminal after the token had already been
collected and the user had to dismiss it by hand.

Call OnLoginSuccess once a non-empty token is in hand, which is what the
login and session-extend flows already do; the Android side reacts by
bringing its own activity forward.
This commit is contained in:
Zoltán Papp
2026-08-11 12:46:02 +02:00
parent 26f7ed858d
commit 9ee5c04687

View File

@@ -373,6 +373,13 @@ func (s *SSHClient) requestJWTToken(cfg *profilemanager.Config) (string, error)
if token == "" {
return "", errors.New("empty token returned by IdP")
}
// Tells the client the browser round-trip is over so it can dismiss the
// surface it opened, the same way the login and session-extend flows do.
// Without it the Custom Tab stays in front of the terminal even though the
// token has already been collected.
go urlOpener.OnLoginSuccess()
return token, nil
}