Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Set the flarum_remember cookie from a GET parameter

This comment has been minimized.

Copy link

@donli1210 donli1210 commented Aug 16, 2017


I tried to integrate Flarum into my existing website. I'm using the API Authentication

POST /api/token HTTP/1.1

"identification": "Toby",
"password": "pass7word"

to get the flarum token and use

setcookie("flarum_remember", $token, time() + (10 365 24 60 60), "/");

to set the flarum cookie. It is working in the begining. But after several hours, the user is automatically logout althrough the "flarum_remember" cookie is still there.

Please advice. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment