keechma

Keechma stack. Mention @U050986L9 or @U2J1PHYNM if you have any questions
bocaj 2016-06-27T17:17:12.000064Z

What do you recommend for keeping login session state? I'm working with PostgREST which is set up to give me a JWT (token) .

bocaj 2016-06-27T17:17:53.000065Z

POST /login  {:user "x" :pass "xpass"}
returns `{:token "jwt token hash stuff"}

bocaj 2016-06-27T17:19:30.000066Z

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

roberto 2016-06-27T17:39:09.000069Z

did something change with reagent that I’m getting this warning now: Use of undeclared Var reagent.ratom/make-reaction ?

roberto 2016-06-27T17:39:17.000070Z

popped up when testing out the todo-mvc example

bocaj 2016-06-27T17:55:27.000071Z

I saw that last week, and it went away with reset-autobuild or something. What versions are in the todomvc?

mihaelkonjevic 2016-06-27T18:46:45.000072Z

@bocaj check this example for login https://github.com/keechma/keechma-login

mihaelkonjevic 2016-06-27T18:47:08.000074Z

basically, you have two apps, and the outer app is starting the inner app when the user is logged in

mihaelkonjevic 2016-06-27T18:47:26.000075Z

in that moment you can add jwt token info to inner app’s application state

bocaj 2016-06-27T18:48:38.000076Z

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?

mihaelkonjevic 2016-06-27T18:49:04.000077Z

:kv is just a namespce I use for random data (it stands for key - value)

bocaj 2016-06-27T18:49:14.000078Z

right, but it's not vacuumed

mihaelkonjevic 2016-06-27T18:49:17.000079Z

nope

bocaj 2016-06-27T18:49:19.000080Z

..in addition to the name

bocaj 2016-06-27T18:49:38.000081Z

ok.

bocaj 2016-06-27T18:51:34.000082Z

entity-db will be blown out after a page-refresh, though. Shouldn't I be using cookies to keep some user identifier?

mihaelkonjevic 2016-06-27T18:51:53.000083Z

I usually put it in local storage or cookie

bocaj 2016-06-27T18:55:23.000084Z

Do you use http://goog.net cookies or another library like https://github.com/reagent-project/reagent-utils ?