How to set Permanent Session for Token in Dreamfactory 2.2.0?



I am building Rest Api and made changes in df.php file by setting

'allow_forever_sessions' => env('DF_ALLOW_FOREVER_SESSIONS', true) 

and also use “remember_me”:true in code for eg.
“id” : 5,
“email” : "",
“password” : “Zxy”,

But, still facing token expiration issues. I want to make token life forever.
What can I do to make it alive ?.
Need help.



I would recommend against changing df.php
System settings should be changed in the .env file

After you make those changes, you may need to clear a cached configuration.

Backup the file bootstrap/cache/config.php; save it somewhere in case clearing the config cache causes problems.
Then run php artisan config:clear


I made changes in df.php file but didn’t find .env file anywhere.
I am working on Dreamfactory-2.2.0.


If this is a Bitnami install it will be in the htdocs folder.
For example, on Windows, this would default to C:\Bitnami\dreamfactory-2.2.0-0\apps\dreamfactory\htdocs\.env

Since the filename starts with a . it is likely hidden in your file browser. You will need to show hidden files to see it.


But where .env file is located ?


See the post right above yours


I tried all the 3 steps that you have mentioned in the post but i am getting

"allow_forever_sessions:false" after calling GET:[](

I am using Dreamfactory 2.9.0. Is that any issue with this version?

Please give me some help.