Skip to content

Commit ab50e76

Browse files
committed
use insecure cookies in the authentication example
closes #79
1 parent 2ddb7ee commit ab50e76

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

examples/user-authentication/login.sql

+6-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ SELECT 'authentication' AS component,
99
-- and save it in a cookie on the user's browser.
1010
INSERT INTO login_session (id, username)
1111
VALUES (sqlpage.random_string(32), :username)
12-
RETURNING 'cookie' AS component, 'session' AS name, id AS value;
12+
RETURNING
13+
'cookie' AS component,
14+
'session' AS name,
15+
id AS value,
16+
FALSE AS secure; -- You can remove this if the site is served over HTTPS.
1317

1418
-- Redirect the user to the protected page.
15-
SELECT 'redirect' AS component, 'protected_page.sql' AS link;
19+
SELECT 'redirect' AS component, 'protected_page.sql' AS link;

0 commit comments

Comments
 (0)