Skip to content

Commit

Permalink
Merge pull request #329 from rusq/ua-fix
Browse files Browse the repository at this point in the history
Patch for the obsolete user agent
  • Loading branch information
rusq authored Oct 5, 2024
2 parents 02dbcae + 7cb9fa1 commit b70a532
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion auth/rod.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down

0 comments on commit b70a532

Please sign in to comment.