Skip to content

Commit 6b3b8a9

Browse files
committed
Fix anthropic login token renew
1 parent 1625899 commit 6b3b8a9

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## Unreleased
44

55
- Fix command prompts to allow args with spaces between quotes.
6+
- Fix anthropic token renew when expires.
67

78
## 0.38.1
89

src/eca/llm_providers/anthropic.clj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@
251251
url
252252
{:headers {"Content-Type" "application/json"}
253253
:body (json/generate-string body)
254+
:throw-exceptions? false
254255
:as :json})]
255256
(if (= 200 status)
256257
{:refresh-token (:refresh_token body)
@@ -341,8 +342,8 @@
341342
(send-msg! (format "Invalid API key '%s'" input))))
342343

343344
(defmethod f.login/login-step ["anthropic" :login/renew-token] [{:keys [db* provider]}]
344-
(let [{:keys [access-token refresh-token expires-at]} (get-in @db* [:auth provider])
345-
{:keys []} (oauth-refresh refresh-token)]
345+
(let [{:keys [refresh-token]} (get-in @db* [:auth provider])
346+
{:keys [refresh-token access-token expires-at]} (oauth-refresh refresh-token)]
346347
(swap! db* update-in [:auth provider] merge {:step :login/done
347348
:type :auth/oauth
348349
:refresh-token refresh-token

0 commit comments

Comments
 (0)