KnpUOAuth2ClientBundle and Google PHP API

I have a Symfony 5 Application that is authenticating users by their Google account using KnpUOAuth2ClientBundle.

I now want to integrate the Google Drive API so the user can upload files to his Drive.
is giving some documentation about that.

What I am wondering: If the user is already authenticated (I have a valid user access token), do I have to run through the whole authentication process again or can I use the authentication token that was generated by KnpUOAuth2ClientBundle? And how do I get this authentication token as an object? When I am trying to get it via $client->getAccessToken() I get the error "Invalid State".

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *