mirror of
https://github.com/logseq/logseq.git
synced 2026-04-29 00:24:51 +00:00
fix(login): auth-callback&auth-refresh-token return json type resp
This commit is contained in:
@@ -85,10 +85,8 @@
|
||||
{:with-credentials? false}))]
|
||||
(if (= 200 (:status resp))
|
||||
(-> resp
|
||||
(:body)
|
||||
(js/JSON.parse)
|
||||
(js->clj :keywordize-keys true)
|
||||
(as-> $ (set-tokens! (:id_token $) (:access_token $) (:refresh_token $))))
|
||||
:body
|
||||
(as-> $ (set-tokens! (:id_token $) (:access_token $) (:refresh_token $))))
|
||||
(debug/pprint "login-callback" resp)))))
|
||||
|
||||
(defn logout []
|
||||
@@ -111,9 +109,7 @@
|
||||
(->
|
||||
resp
|
||||
(as-> $ (and (http/unexceptional-status? (:status $)) $))
|
||||
(:body)
|
||||
(js/JSON.parse)
|
||||
(js->clj :keywordize-keys true)
|
||||
:body
|
||||
(as-> $ (set-tokens! (:id_token $) (:access_token $))))
|
||||
true))))))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user