Skip to content

Commit

Permalink
Fix cached device flow oauth (netbirdio#2833)
Browse files Browse the repository at this point in the history
This change removes the cached device flow oauth info when a down command is called

Removing the need for the agent to be restarted
  • Loading branch information
mlsmaycon authored Nov 5, 2024
1 parent 5b46cc8 commit b952d86
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions client/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down

0 comments on commit b952d86

Please sign in to comment.