Auth0 Home Blog Docs

PHP storage - how to store in cookie?

php

#1

Hi,

I followed the PHP quick start and everything is working. However, each time I want to use my app, I have to login, which is pretty annoying. As I understand from the documentation, this is due to the fact that the information is stored in a PHP session. Is that correct ? If so, I would like to store it in a cookie so that I can extend the storage time beyond my browser session. Is this possible ? Could you be so kind and provide with a php example code for this ?

Thank you in advance,

Konrad


#2

Hi @konradh,

Apologies for the delay here. Is there a reason why PHP sessions are not working for you? That method should persist the login for as long as the PHP session cookie lasts (we hard set that to 7 days currently). Are you using hosting that does not support sessions?

As for cookie storage … we’re working on that now as an option but won’t have that out for a few weeks, at least.

Thanks!