Commit d3214a46 authored by zolij's avatar zolij

token session fix

parent afa559ea
......@@ -23,8 +23,10 @@ class AuthSCHClient {
// get tokens from auth.sch.bme.hu
$this->authenticate();
//save tokendata to session
$_SESSION['tokens'] = serialize($this->tokens);
//save tokendata to session (if we did authentication -> we have refresh token)
if(isset($this->tokens->refresh_token))
$_SESSION['tokens'] = serialize($this->tokens);
} else {
// load tokendata from session
$this->tokens = unserialize($_SESSION['tokens']);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment