# Google authentication

Visit [Google API Console](https://console.developers.google.com/).

Create new project or select one if you already create one.

![](https://2886676663-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M15aAl8UGIPUvccCl0n%2F-M4L7RtvPHxyo9DSACVw%2F-M4L9mp6ufsxrnjlZnKA%2Fsss.png?alt=media\&token=b8fcdf03-a9c4-4a77-be50-424ccf34f9f2)

Next open **Library** from the left menu.

![](https://2886676663-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M15aAl8UGIPUvccCl0n%2F-M4L7RtvPHxyo9DSACVw%2F-M4LAg3IhJFr5zJAmto7%2Fsss.png?alt=media\&token=adeef6f9-7f18-4f7f-916a-33ae3fcb6a51)

Find Google+ API and click on that.

![](https://2886676663-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M15aAl8UGIPUvccCl0n%2F-M4L7RtvPHxyo9DSACVw%2F-M4LAvTsWb9-aB4Otcul%2Fsss.png?alt=media\&token=a4d3b8c2-2248-40a1-acb0-51e8ca562587)

Enable Google+ API.

![](https://2886676663-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M15aAl8UGIPUvccCl0n%2F-M4L7RtvPHxyo9DSACVw%2F-M4LBK6atGcZeqZ8ME9o%2Fsss.png?alt=media\&token=8c10f7ba-3014-44fe-9754-61b476e8ddcf)

Now after you enable the API from the left menu click **QAuth consent screen** and select **External.**

![](https://2886676663-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M15aAl8UGIPUvccCl0n%2F-M4L7RtvPHxyo9DSACVw%2F-M4LDCZvl3QNarNVtNNE%2Fsss.png?alt=media\&token=70a1aa9f-d4e1-4091-a37e-3bced977ded6)

Next fill the following information connected with your domain project and click **Save**.

![](https://2886676663-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M15aAl8UGIPUvccCl0n%2F-M4L7RtvPHxyo9DSACVw%2F-M4LDlW738JhZ5k6SpWY%2Fsss.png?alt=media\&token=c54944eb-0c1c-47a7-b1c4-1bd6780da92b)

Now open **Credentials** from left menu, click **Create Credentials** and select **QAuth client ID.**

![](https://2886676663-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M15aAl8UGIPUvccCl0n%2F-M4L7RtvPHxyo9DSACVw%2F-M4LEY8jl2ddo2pCqef9%2Fsss.png?alt=media\&token=f9ee5a51-28ca-49c7-b2ad-07dfd64dc88f)

Select **Web application** and fill the information for your project domain.

![](https://2886676663-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M15aAl8UGIPUvccCl0n%2F-M4L7RtvPHxyo9DSACVw%2F-M4LGUVxzBeqsYeTLJ0e%2Fsss.png?alt=media\&token=b5606fa2-8752-475a-b75c-4b51120aec6c)

{% hint style="danger" %}
NOTE: Your domain need to be the same as the previous in the **QAuth consent screen.**

Also the redirect route need to be the same as it is define in the picture.

***<https://yourdomain.com/login/google/redirect>***
{% endhint %}

{% hint style="info" %}
If you have some problems with authorizing your domain please open **authorized domains list** and add your domain.&#x20;
{% endhint %}

Click **Create** and copy the given credentials in the .env file.

![](https://2886676663-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M15aAl8UGIPUvccCl0n%2F-M4L7RtvPHxyo9DSACVw%2F-M4LHo4_VKSpbhmJ4mtS%2Fsss.png?alt=media\&token=b40b0b23-95ee-49fc-86ee-b47c67464ec5)

```
GOOGLE_CLIENT_ID="" //Used for google login
GOOGLE_CLIENT_SECRET="" //Used for go0gle login
GOOGLE_REDIRECT="" //Used for google login
```
