From 397935610dc529346c93157249e7c7fd882ce27b Mon Sep 17 00:00:00 2001 From: Maycon Santos Date: Sat, 2 Nov 2024 10:21:48 +0100 Subject: [PATCH] Fix cached device flow oauth This change removes the cached device flow oauth info when a down command is called Removing the need for the agent to be restarted --- client/server/server.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/server/server.go b/client/server/server.go index 4d921851f94..106bdf32bbf 100644 --- a/client/server/server.go +++ b/client/server/server.go @@ -626,6 +626,8 @@ func (s *Server) Down(ctx context.Context, _ *proto.DownRequest) (*proto.DownRes s.mutex.Lock() defer s.mutex.Unlock() + s.oauthAuthFlow = oauthAuthFlow{} + if s.actCancel == nil { return nil, fmt.Errorf("service is not up") }