Fork me on GitHub

is there a middleware for displaying session information in a footer or something? or do i have to do that by hand?


like the debugging/error page that looks like rails’, but just… always there showing params/session info


answering my own question: at least for selmer, my question was really how do i pass parameters into a template, which is done with {% debug %}


so after login i’m redirecting to another page using the following, but it doesn’t seem to preserve session information. any ideas on where i should look?

(-> (response/found "/authenticated-test")
        (assoc :session (assoc session :identity user-identity)))


there isn’t even a :session value in :params. (This is based on the luminus template. I’ll ask in there too.)


Where are you getting session from?


Are you pulling it from the request, and have you added the session middleware?


I tried putting wrap-session above the wrap-defaults and nothing changed.


You shouldn’t need an additional wrap-session if you already have wrap-default. Have you tried using a different session store?


just tried setting it to cookie-store following and there’s no change.


Have you checked the browser to see if the cookie is being set correctly?


Have you checked the session directly? Perhaps the problem is with how you’re integrating it into Buddy.


I think I’m passing these things on but honestly I don’t know. I’m trying to follow documentation, and this looks like what everyone else is doing. I don’t want to have to worry about this stuff; I guess I figured that in a mature library ecosystem this would be a solved problem.


Why do you think the session information isn’t being preserved?


Also by your use of :identity are you using Buddy authentication? If so, where have you set it up?


entire repo is here: I don’t think the session information is being preserved because I can’t see it as accessible from my templates. The CSRF code gets passed. I figured luminus would pass it on to the layout function (because literally if it did not what would be the point of the template at all?) but I have assumed my way into a frustrating corner before.


Ah. It doesn’t.


It looks like you’re passing the request into the template, but then assuming that there’s an :identity key? But I don’t see where that would come from.


Yeah, I’m seeing that now.


Once again, I assumed the point of the template would be to be helpful and pass the whole session to the template… ug.