Created
February 12, 2017 13:54
-
-
Save woganmay/a77c1826af966a936f817151fe510bf4 to your computer and use it in GitHub Desktop.
Set the flarum_remember cookie from a GET parameter
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
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!