Why is session_write_close() called in Session class?
I use your lib with Zend Framework 1.x, but after your lib has done it's work I need to add some info to session, but session is already closed. Class Session has destructor, that why I can't add data to session
public function __destruct()
{
if ($this->startSession) {
session_write_close();
}
}
Why lib uses this destructor?
We're having the same issue by the way. After the library finishes execution we're locked out of our session. Fix please :)
Hey, can you just start you session before you load OAuth Session class. Also, if you still face inconvenience - I can add parameter to prevent session close or close session only if session started manually and load session in lazy manner - when it's really needed.
If you need the fix, please open issue on my fork
@logical-and I need that fix, in my case I'm using sessions just after
json_decode($googleService->request('https://www.googleapis.com/oauth2/v1/userinfo'), true);
Now that I updated this library my code stopped work, I had a terrible time trying to guess what the problem is :/
This issue also came up for me. This caused my other unrelated sessions to not write correctly.
This is a great library and I've used it a bunch... but this one line has cost me many development hours over the last few years.
I'm writing a comment because maybe then I won't forget about this. A year later I'll be upgrading/switching servers/doing another project with social login... and completely forget and then waste a few more hours wondering why my sessions don't work because of this line.