Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where do i get the web client secret in firebase Google Login for android?

When i create the project first time. It gives the WEBclientID and Web Client secret. And i delete the the app beacause something did i wrong but google login webclient id still there so i removed it and create the new android app but i cannot enable the google login beacuse of web client secret. So please suggest me where do i found and slove it. Please check the image below. Thanks in advance.

where do i found the web client secret.

like image 840
Anil Avatar asked May 24 '18 11:05

Anil


People also ask

How do I find my Firebase Web client ID?

To find the OAuth 2.0 client ID: Open the Credentials page in the GCP Console. The Web application type client ID is your backend server's OAuth 2.0 client ID.

Where is app secret in Firebase?

On the menu tab select your firebase project from the dropdown menu. On the Credentials tab you will find all your keys both API keys and OAuth 2.0 client IDs for both browser and server authentications.


Video Answer


4 Answers

You can find it from google-services.json class

enter image description here

like image 145
Muhaiminur Rahman Avatar answered Oct 21 '22 11:10

Muhaiminur Rahman


In react-native android.

i had same issue after i completely deleted app(android) in firebase.

In newly created android app in firebase, i downloaded google-services.json and put it in android/app/google-services.json of my project.

i got the issues of error code 10.

I had solved error code 10 problem in two issues.

1. i found out that webClientId was wrong, i put webClientId from Firebase Authentication ---> Signin Method ---> Signin provider of Google login---> Web sdk in my project (that cause the error). Then i checked from google-services.json and select webClientId from this part

  ...
  "services": {
        "appinvite_service": {
          "other_platform_oauth_client": [
            {
              "client_id": "252222667222-26fq87bu3ha705mvbon55s7fffffff.apps.googleusercontent.com", //<-- select this
              "client_type": 3
            }

          ]
        }
      }  
   ...

put it in

GoogleSignin.configure({
  scopes: ['https://www.googleapis.com/auth/drive.readonly'], // what API you want to access on behalf of the user, default is email and profile
  webClientId:"paste here clientId"})

then it solved my problem

2. In other issue, My debug key was mismatch, In firebase i was putting wrong debug SH1 using this command.

keytool -exportcert -list -v -alias androiddebugkey -keystore ~/.android/debug.keystore

Switch to android/app/build/outputs/apk/release/app-debug.apk and used this command

keytool -list -printcert -jarfile app-debug.apk

two SH1 were different, then put generated SH1 of app-debug.apk in firebase, then it fixed error code 10 issue.

like image 7
Raikumar Khangembam Avatar answered Oct 21 '22 11:10

Raikumar Khangembam


URL: https://console.firebase.google.com/ Please follow this breadcrumbs

1. Authentication → Google → Enable enter image description here

2. Click on the Google Enabled link. Then opened the window below.

enter image description here

3. Click on Web SDK configuration

enter image description here

4. We can get Web Client ID here.

5. Copy the Web Client ID from this text box.

like image 7
Santosh Singh Avatar answered Oct 21 '22 12:10

Santosh Singh


Finally, I found the solution to my problem. we create the android project on firebase console. I figured out creating new Id and just looked on Google Console API credentials. It creates the two auth Id one for android and Second for web login. We need the Google web login web client id and secret for google login enable in firebase console. It works now. Thank you for your replies Guys.

like image 2
Anil Avatar answered Oct 21 '22 10:10

Anil