I am facing a little issue when trying to make my oAuth process.
I have setup an API action with oAuth2 Authorize and i trigger it when clicking on a button in my page. the process works fine but then I am redirected to my api action with the tokens. What next? How do i use the tokens? where are they stored? I am confused.
I saw the series of tutorials but this part is not treated...
Saying that as far as I know you'll need to use the api on the server side: https://developers.google.com/photos/library/reference/rest/v1/albums/list
And use the refresh token each time to get the access token.
And when you get the access token, you call: url: https://photoslibrary.googleapis.com/v1/albums header: Authorization: Bearer ACCESS_TOKEN
Don't store the access token
Use the refresh token and store it on a secure place:
Note: Save refresh tokens in secure long-term storage and continue to use them as long as they remain valid.