Prefer an available OAuth flow instead of hard-coding device code

This commit is contained in:
Viktor Liu
2026-08-12 17:27:52 +02:00
parent db9fcf39ef
commit 0f593450d7
15 changed files with 695 additions and 111 deletions

View File

@@ -58,7 +58,8 @@ func (s *Session) RequestExtend(ctx context.Context, p ExtendStartParams) (Exten
return ExtendStartResult{}, err
}
req := &proto.RequestExtendAuthSessionRequest{}
// a request from the UI implies a graphical session, which the daemon cannot detect itself
req := &proto.RequestExtendAuthSessionRequest{HasGraphicalSession: true}
if p.Hint != "" {
h := p.Hint
req.Hint = &h