> For the complete documentation index, see [llms.txt](https://doc.newsfreak.mrb-lab.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.newsfreak.mrb-lab.com/additional-setup/10.-social-logins-setup/10.1-google-login.md).

# 10.1 Google Login

Go to your Firebase console>Your Project>Authentication>Sign-in-method and enable **Google** and save it.

<div align="left" data-full-width="false"><figure><img src="/files/kaT78YcZfr674eXpRHnS" alt=""><figcaption></figcaption></figure></div>

## Android Setup

1. You have to configure some stuff for Google sign-in. Go to the Google Cloud Console.

> Google Cloud Console: <https://console.cloud.google.com/apis/credentials/consent?project=travel-hour-252505>

2. Make sure you are signed in with the same account with which you have created the Firebase project. Also, make sure that on the top-left corner, your project is selected for which you are filling this consent.

<figure><img src="/files/9gtZhm6X1tgkguMVPXc4" alt=""><figcaption></figcaption></figure>

3. Now Click on the **OAuth consent screen tab > External > Create** and start filling out the form.
4. Enter the **Application name**, **Application logo** & **Support email**.

<figure><img src="/files/D0DenrmKEq7fahoyuY64" alt=""><figcaption></figcaption></figure>

5. In all these places, you have to enter the same link starting with **https\://** then your app domain name which I have marked with green below.
6. Then, scroll down and fill in the Application Homepage link, Application Privacy Policy link, and Application Terms of Services link.

<figure><img src="/files/1Go5PLCatxNkg9JOJNI7" alt=""><figcaption></figcaption></figure>

7. Save the form by clicking on the Save button.

### Generate Debug Certificate

* To generate a debug certificate, run this command on your terminal from your app

  root directory.

{% tabs %}
{% tab title="Mac" %}

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

{% endtab %}

{% tab title="Windows" %}

```
keytool -list -v \
-alias androiddebugkey -keystore %USERPROFILE%\.android\debug.keystore
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
If this command doesn’t work, then go to this [link](https://developers.google.com/android/guides/client-auth) and copy the debug command from there according to your os.
{% endhint %}

* Use ​**android** as a debug password when the terminal asks for a password.

<figure><img src="https://lh6.googleusercontent.com/f8BzDO8crzYiwc2v7AfkKyJq1yFmoF6IwFblbkm89LrcKJWkRVuxxgxiTCrVyjxNQaffwhoaaXoPpNy5GBPIw869tiOZzlZ_lxfJezWD9D924HhKCEC8ET3-ahE8xRYJiQZsjUt2L1NC76p17zapQyRy-AP55MvHG-H5PRN_0zpn7RGGxlhVBnyN5-Zu" alt=""><figcaption></figcaption></figure>

* Copy the **SHA1** certificate code and go to **Firebase Console > Your Project > Project Settings** and click on the android icon and then add the **SHA1** code by clicking ​**add fingerprint​** button. Look at the picture below:

<figure><img src="https://lh3.googleusercontent.com/NiFFfBOiIGw_FxsQ_DDn57E3-Q9LvspXdAdpmred0Z1eXBM_1SFFDjIW-CUHEi7YnmQKoBf2JGi3LysoNoqZH9jh0iNIPOap0WZQULQvURTiOqx9gOyk-n2Nnm_H_pY6JnEj4uZVbl6GsLWtGquqEbB83w12csRd3u8hVdMliaV47CoyVAdCBZWG9rTZ" alt=""><figcaption></figcaption></figure>

### Generate Release Certificate

To generate a release certificate,

* Run with replacing your **alias\_name** and **keystore\_location**.

```
keytool -list -v -keystore keystore_location -alias alias_name
```

{% hint style="info" %}
Your alias\_name is **upload** and keystore\_location is the path(directory) of the **upload-keystore.jks** file.
{% endhint %}

* After that, you will get a **SHA1** code. Copy that code and add it to your **Firebase Console > Project Settings >  Android**, where you previously added a debug SHA1 code.

<figure><img src="https://lh3.googleusercontent.com/NiFFfBOiIGw_FxsQ_DDn57E3-Q9LvspXdAdpmred0Z1eXBM_1SFFDjIW-CUHEi7YnmQKoBf2JGi3LysoNoqZH9jh0iNIPOap0WZQULQvURTiOqx9gOyk-n2Nnm_H_pY6JnEj4uZVbl6GsLWtGquqEbB83w12csRd3u8hVdMliaV47CoyVAdCBZWG9rTZ" alt=""><figcaption></figcaption></figure>

***

## iOS Setup

From the Source code, go to the **ios/runner/**&#x200B;**GoogleService-info.plist**​ file from your IDE or from  Xcode and copy the **REVERSED\_CLIENT\_ID**. (See the picture below)​

<figure><img src="/files/BwvCi2EUZy9Iyj92QENr" alt=""><figcaption></figcaption></figure>

* Go to the **i​os/Runner/Info.plist​** file and replace the **R​EVERSED\_CLIENT\_ID** here.

<figure><img src="/files/tbQ3ulYSyemLdvMlAIeV" alt=""><figcaption></figcaption></figure>
