From e1ca66197c7df74d734e48029464b009aa23f948 Mon Sep 17 00:00:00 2001 From: andig Date: Thu, 30 Oct 2025 17:58:58 +0100 Subject: [PATCH] Provider Auth: avoid duplicate device names in ui --- plugin/auth/oauth.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugin/auth/oauth.go b/plugin/auth/oauth.go index 48f14f6f6..b805e4884 100644 --- a/plugin/auth/oauth.go +++ b/plugin/auth/oauth.go @@ -8,6 +8,7 @@ import ( "fmt" "net/http" "net/url" + "slices" "strings" "sync" "time" @@ -125,7 +126,7 @@ func NewOauth(ctx context.Context, name, device string, oc *oauth2.Config, opts name: name, } - if device != "" { + if device != "" && !slices.Contains(o.devices, device) { o.devices = append(o.devices, device) }