Hi,
I am using fix/ssql-guile3 branch on Debian 10 with PostgreSQL
Consider the controller/view:
----BEGIN----Controller-----------------------------------------
(post "/auth"
#:auth `(table person "lnuser" "passwd" "salt" ,my-hmac)
#:session #t
(lambda (rc)
(let* (
(results (:auth rc)))
(view-render "test" (the-environment))
)))
-----END------------------------------------------------------
----BEGIN-------.../login/test--------------------------------------------
results: <%= results %>
----END------------------------------------------------------
If I start with an empty sessions table and submit the login form with valid credentials I see in the view:
results: b29600ec9b7c131278b4b2ba366433b7
Looking in the sessions table:
lndb=# select * from sessions;
sid | data | expires | client | valid
----------------------------------+------+-------------------------------+-----------+-------
b29600ec9b7c131278b4b2ba366433b7 | () | Sun, 17 Jan 2021 16:32:01 GMT | 127.0.0.1 | 1
From the manual I expect (:auth rc) to validate the user, and then I need to submit (:session rc 'spawn) to spawn a session. Looks like the session is spawned with (:auth rc). Also, I see the cookie in the browser console - "sid" with the value "b2960....".
If I submit invalid credentials - no session, no sid cookie.
Is this how it works now?
Thanks
Mortimer