From 7f6fb4b7eae994972f883384de7feed4702c1c20 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 5 Jul 2026 23:25:53 +0300 Subject: release v1.3.1: extend LinkedIn re-auth timeout The interactive browser login/consent flow was bounded by a 1-minute context timeout, too short for manual credential entry and 2FA, causing "context deadline exceeded" errors. Bumped to 5 minutes. Co-Authored-By: Claude Sonnet 5 --- internal/platforms/linkedin/linkedin.go | 7 ++++++- internal/version.go | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'internal') diff --git a/internal/platforms/linkedin/linkedin.go b/internal/platforms/linkedin/linkedin.go index ced242a..a9a6fef 100644 --- a/internal/platforms/linkedin/linkedin.go +++ b/internal/platforms/linkedin/linkedin.go @@ -22,6 +22,11 @@ var errUnauthorized = errors.New("unauthorized access, refresh or create token?" const linkedInTimeout = 10 * time.Second +// linkedInAuthTimeout bounds the interactive browser login/consent flow when +// (re-)authenticating, so it needs to be generous enough for manual entry of +// credentials and 2FA rather than a normal API call timeout. +const linkedInAuthTimeout = 5 * time.Minute + // addCommonHeaders applies required headers and optional LinkedIn versioning. func addCommonHeaders(req *http.Request, accessToken, liVersion string) { req.Header.Set("Authorization", "Bearer "+accessToken) @@ -51,7 +56,7 @@ func post(ctx context.Context, args config.Args, sizeLimit int, en entry.Entry) timeout := linkedInTimeout if args.Config.LinkedInAccessToken == "" { // Refreshing access token requires more time due to human interaction - timeout = 1 * time.Minute + timeout = linkedInAuthTimeout } newCtx, cancel := context.WithTimeout(ctx, timeout) defer cancel() diff --git a/internal/version.go b/internal/version.go index 5e688a8..75206e1 100644 --- a/internal/version.go +++ b/internal/version.go @@ -6,7 +6,7 @@ import ( "codeberg.org/snonux/gos/internal/table" ) -const versionStr = "v1.3.0" +const versionStr = "v1.3.1" func printVersion() { table.New(). -- cgit v1.2.3