From 7cb9fa1919d294e18ddbf21de956b741780af1f9 Mon Sep 17 00:00:00 2001 From: Rustam Gilyazov <16064414+rusq@users.noreply.github.com> Date: Sun, 6 Oct 2024 09:42:28 +1000 Subject: [PATCH] fix for obsolete user agent --- auth/rod.go | 3 ++- go.mod | 2 +- go.sum | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/auth/rod.go b/auth/rod.go index ba2a3c30..5168a4ff 100644 --- a/auth/rod.go +++ b/auth/rod.go @@ -85,7 +85,7 @@ func NewRODAuth(ctx context.Context, opts ...Option) (RodAuth, error) { switch resp { case auth_ui.LInteractive: var err error - sp.Token, sp.Cookie, err = slackauth.Browser(ctx, r.opts.workspace) + sp.Token, sp.Cookie, err = slackauth.Browser(ctx, r.opts.workspace, slackauth.WithUserAgentAuto()) if err != nil { return r, err } @@ -125,6 +125,7 @@ func headlessFlow(ctx context.Context, workspace string, ui browserAuthUIExt) (s username, password, slackauth.WithChallengeFunc(ui.ConfirmationCode), + slackauth.WithUserAgentAuto(), ) if loginErr != nil { return sp, loginErr diff --git a/go.mod b/go.mod index ac5feeeb..1a66f8c6 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ require ( github.com/rusq/dlog v1.4.0 github.com/rusq/osenv/v2 v2.0.1 github.com/rusq/secure v0.0.4 - github.com/rusq/slackauth v0.2.0 + github.com/rusq/slackauth v0.2.1-0.20241005233803-21a386ee85da github.com/rusq/tracer v1.0.1 github.com/schollz/progressbar/v3 v3.13.0 github.com/slack-go/slack v0.12.5 diff --git a/go.sum b/go.sum index edf570f3..daa9886d 100644 --- a/go.sum +++ b/go.sum @@ -123,6 +123,8 @@ github.com/rusq/slackauth v0.1.3 h1:8snwPxuXh0Vv6iKANO1/eDUNC89nTbRMNdqnSqoO6vo= github.com/rusq/slackauth v0.1.3/go.mod h1:/+6JZULYSpWk7/Dc232132wF6UbFOLV8DhSz55zBcnw= github.com/rusq/slackauth v0.2.0 h1:efSwicJA/z9NS4wJFQg84vxlryFBCRODG2UPo9LfnUE= github.com/rusq/slackauth v0.2.0/go.mod h1:/+6JZULYSpWk7/Dc232132wF6UbFOLV8DhSz55zBcnw= +github.com/rusq/slackauth v0.2.1-0.20241005233803-21a386ee85da h1:Rndrtq+DZyXVKPZ5TgZMDdZ1l2YUBENawnoQXxHgJLs= +github.com/rusq/slackauth v0.2.1-0.20241005233803-21a386ee85da/go.mod h1:/+6JZULYSpWk7/Dc232132wF6UbFOLV8DhSz55zBcnw= github.com/rusq/tracer v1.0.1 h1:5u4PCV8NGO97VuAINQA4gOVRkPoqHimLE2jpezRVNMU= github.com/rusq/tracer v1.0.1/go.mod h1:Rqu48C3/K8bA5NPmF20Hft73v431MQIdM+Co+113pME= github.com/schollz/progressbar/v3 v3.13.0 h1:9TeeWRcjW2qd05I8Kf9knPkW4vLM/hYoa6z9ABvxje8=