From b952d8693d670ae56ef12348d14a3779b2535740 Mon Sep 17 00:00:00 2001 From: Maycon Santos Date: Tue, 5 Nov 2024 14:51:17 +0100 Subject: [PATCH] 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 --- client/server/server.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/server/server.go b/client/server/server.go index 4d921851f..106bdf32b 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") }