google-drive-apicredentialsgoogle-identity-toolkitapi-authorization

How to use Google Identity Toolkit to connect to Google Drive API?


I want to use Google Identity Toolkit to sign up and authenticate my users. In another part of my app, I want to use the Google Drive API to allow users to choose media files to link with their profile.

Will setting up GITKit make it easier to use the Drive API? Can I share credentials (i.e. API key) between the two services? Are they totally separate? I'm pretty confused so any help would be appreciated.


Solution

  • First of all, please consider to use Firebase Authentication, which is the new version of Google Identity Toolkit.

    In both Firebase Authentication SDK and Google Identity Toolkit SDK, your app can specify the Google Drive scope when initializing the Google provider. In this way, once the end users sign into your app with Google, your app can get the Google oauth2 access token that has the permission for the Google Drive scope. Your app can call Google Driver API with that access token, without prompting the user.