From 4c1c878a4d7d8c23a434084d28569fd6cdbe87db Mon Sep 17 00:00:00 2001 From: andig Date: Thu, 9 Oct 2025 09:49:07 +0200 Subject: [PATCH] chore: stricter error checking --- plugin/auth/oauth.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugin/auth/oauth.go b/plugin/auth/oauth.go index 962b81798..a64784a2e 100644 --- a/plugin/auth/oauth.go +++ b/plugin/auth/oauth.go @@ -187,7 +187,7 @@ func (o *OAuth) Token() (*oauth2.Token, error) { token, err := o.oc.TokenSource(o.ctx, o.token).Token() if err != nil { // force logout - if strings.Contains(err.Error(), "invalid_grant") && settings.Exists(o.subject) { + if strings.Contains(err.Error(), "invalid_") && settings.Exists(o.subject) { o.token = nil o.onlineC <- false settings.Delete(o.subject) @@ -289,7 +289,6 @@ func (o *OAuth) Logout() error { defer o.mu.Unlock() o.token = nil - o.onlineC <- false return nil