What do you recommend for keeping login session state? I'm working with PostgREST which is set up to give me a JWT (token) .
POST /login {:user "x" :pass "xpass"}
returns
`{:token "jwt token hash stuff"}The plan right now is to store the token in a cookie and before each request, ask if that cookie exists. Then, insert the token in the auth header. The logout controller would remove the cookie
did something change with reagent that I’m getting this warning now: Use of undeclared Var reagent.ratom/make-reaction
?
popped up when testing out the todo-mvc example
I saw that last week, and it went away with reset-autobuild or something. What versions are in the todomvc?
@bocaj check this example for login https://github.com/keechma/keechma-login
basically, you have two apps, and the outer app is starting the inner app when the user is logged in
in that moment you can add jwt token info to inner app’s application state
Ok. I was having trouble keep the current user info after my login app started the main app. I need to use :kv while using entity-db in order keep some state for main-app, yes?
:kv is just a namespce I use for random data (it stands for key - value)
right, but it's not vacuumed
nope
..in addition to the name
ok.
entity-db will be blown out after a page-refresh, though. Shouldn't I be using cookies to keep some user identifier?
I usually put it in local storage or cookie
Do you use http://goog.net cookies or another library like https://github.com/reagent-project/reagent-utils ?