I'm using the Ninjauth package and a custom authentication package I wrote on top of it. When debugging, I login with facebook and come back after parsing the oAuth2 response with Ninjauth that also then sets in session a ninjauth.user and .authentication data.
Ninjauth has:
use Session;
then
Session::set('ninjauth', array(data));
First I notice in debug mode that after executing the above line and then doing an evaluate on Session::read() and Session::instance() the data variable is empty. Odd...
If I do
Session::instance()->set('ninjauth',array(data));
Then do a Session::instance()-read() data is there.
The script then redirects to a specficied url which in my code is executed inside an auth module namespaced to auth.
\Session::get('ninjauth',false); always returns false
\Session::instance()->get('ninjauth',false); always returns false
The false response is true regardless of setting it with Session::set() or Session::instance()->set().
Using default session configurations.
Not sure what else to troubleshoot?
In case anyone else experiences this issue I found out that crypt.php config file is required for sessions to work apparently. I guess that makes sense.
Could make for a good documentation update to note somewhere on the session configuration docs page that crypt configuration is required.
Crypt config should be automatic in case your webserver has write access to app/config, or bail out with an exception if not.
If you have errors disabled, you whould still see an error message and find a log entry.