Fix cached device flow oauth (#2833)

This change removes the cached device flow oauth info when a down command is called

Removing the need for the agent to be restarted
This commit is contained in:
Maycon Santos 2024-11-05 14:51:17 +01:00 committed by GitHub
parent 5b46cc8e9c
commit b952d8693d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -626,6 +626,8 @@ func (s *Server) Down(ctx context.Context, _ *proto.DownRequest) (*proto.DownRes
s.mutex.Lock() s.mutex.Lock()
defer s.mutex.Unlock() defer s.mutex.Unlock()
s.oauthAuthFlow = oauthAuthFlow{}
if s.actCancel == nil { if s.actCancel == nil {
return nil, fmt.Errorf("service is not up") return nil, fmt.Errorf("service is not up")
} }