@DEPRECATED Get custom Google OAuth2 refresh token

This is step by step self explained tutorial. TODO(stepanic): implement it with few clicks as the part of web app.

1. Generate auth URL

Login with custom Google Account which will be owner of content uploaded to the Google Photos Album
Open Advanced and click Go to FirePixy Vjenčanja (unsafe)
Accept all 5 scopes of Google Photos API
Accepted all 5 scopes at Google APIs consent screen
Google APIs will return Authorization code to http://localhost:4200...

2. get refresh token from Authorization code

  • copy the whole redirect URL from address bar

    • starts with

      • http://localhost:4200/oauth2callback?code=

  • call Firebase function

  • get the value from the response at the field refreshToken and copy to the Firestore field googlePhotosOAuthRefreshToken at user document in users collection or at event document at sub-collection events if you want specific custom Google Photos token per event

    • refresh token lookup priority

      • if event has use it

        • else if user has use it

Example command in a terminal

3. Store the custom Google Photos refresh token at Firestore

Use custom Google Photos token for all user's events.

At users/{user} Firestore document

Use custom Google Photos token per specific event.

At users/{user}/events/{event} Firestore document

Last updated

Was this helpful?