I might be doing something completely wrong here, but…
def create(conn, params) do
put_session(conn, :gin, "tonic")
Logger.debug "SESSION: #{inspect(get_session(conn))}"
[...]
end
shouldn’t this controller action set the value for given key in the session?
What I get is only:
[debug] SESSION: %{"_csrf_token" => "cVSOEuWk1iGWN-iIfskUyNF6"}
And if I check for the exact key I used in put_session()
I get nil
. Any clues what I am doing wrong?
Configuration is the default one with endpoint.ex
reading:
# The session will be stored in the cookie and signed,
# this means its contents can be read but not tampered with.
# Set :encryption_salt if you would also like to encrypt it.
@session_options [
store: :cookie,
key: "_<the_app_name>_key",
signing_salt: "ELJOxI/O"
]
where <the_app_name>
is of course the correct application name