googlecodelabs / photos-sharing

Code for the "Build a Photo Sharing app with Google Photos and Flutter" codelab
Apache License 2.0
98 stars 71 forks source link

Google sign-in error, configuration questions. #12

Closed eungikim closed 4 years ago

eungikim commented 5 years ago

1. I finished setting up the Firebase and setting up the Google Cloud platform(photo). However, can't sign-in.

I think it's strange that the Google Cloud platform project has a different name from the Firebase project.

The Firebase 'PlayGround' project was created to use the FireStore, and the 'PracticeProject' on the Google Cloud platform was created to use Google map. Is this a problem?

Note: In [IAM & admin - IAM] section, 'PlayGround' are included in the 'PracticeProject' permission member list. I don't know how it got in.

2. And one more strange thing. I set up the use of Google Photos Library and set the OAuth content screen.

But, In [APIs & Service - Photos Library API - Overview] section, They show [To use this API, you may need credentials. Click 'Create credentials' to get started] notification.

I press the 'Create credentials' button and follow the instructions:

image

then GCP say you have to create an OAuth 2.0 client ID. But SHA-1 key and android package is already in use.

What exactly is the problem?

jfschmakeit commented 4 years ago

It sounds like you are trying to set up a different project for use with the codelab and the Google Photos Library API. If you are running through the codelab, we would recommend creating a new Firebase project dedicated to it and following the steps in the codelab closely to configure your Firebase and signing configuration. If you are running into any 'duplicate key' issues, you may have to remove the signing certificate/package name combination from any other projects you have configured.

If you want to get started with the Google Photos Library API, you can follow the steps in our developer guide that will walk you through setting up a Google Developers project, enabling the API and configuring sign in: https://developers.google.com/photos/library/guides/get-started

The wizard you have encountered is not useful when you are following the codelab, as you will be using Firebase to handle Google Sign-In and authentication. The credentials are configured in step 4 in the codelab directly in the Firebase console.

If you are setting this up for a different application, you should follow the wizard to configure OAuth access, ("User data"), as you will need authorization from a user. You can find out more about this here: https://developers.google.com/photos/library/guides/authentication-authorization