TheNetworg / oauth2-azure

Azure AD provider for the OAuth 2.0 Client.
https://packagist.org/packages/thenetworg/oauth2-azure
MIT License
230 stars 108 forks source link

issues storing access token in session #149

Open gonsalvg opened 2 years ago

gonsalvg commented 2 years ago

Heyo, stuck again with another question. Once again, not a PHP expert, but I think this should be working as I have it set up.

$_SESSION['graph_token']= $token;

fetching token from session gives an error for incomplete class - issue restoring the class from session

trying to instance accesstoken from the library using the token string (from token->gettoken)and now I get "expires" is not set on the token when trying to use it.

Acsiod commented 5 months ago

$_SESSION['graph_token']= serialize($token);

Then

if(isset($_SESSION['graph_token']))
{$token = unserialize($_SESSION['graph_token']);}