Skip to content

Commit

Permalink
[authentication profile] Replace ratom with atom for keycloak obj
Browse files Browse the repository at this point in the history
Using a ratom is not really necessary.
  • Loading branch information
bgalartza committed Oct 24, 2023
1 parent 4df2f93 commit 776d497
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
[<<project.name>>.client.session.user :as user]
[cljsjs.keycloak-js]
[goog.object :as g]
[re-frame.core :as rf]
[reagent.core :as r]))
[re-frame.core :as rf]))

;; Keycloak Javascript library is not designed to be used in a
;; functional way. When you create a keycloak object to interact with
Expand All @@ -29,7 +28,7 @@
;; there). So after an internal discussion, we have decided that the
;; least hacky way of doing it is storing the Keycloak object in a
;; Reagent atom.
(defonce keycloak (r/atom nil))
(defonce keycloak (atom nil))

(rf/reg-event-fx
::set-auth-error
Expand Down

0 comments on commit 776d497

Please sign in to comment.