> For the complete documentation index, see [llms.txt](https://mobidonia.gitbook.io/mresto/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mobidonia.gitbook.io/mresto/define-basics/google-authentication.md).

# Google authentication

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

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

![](/files/-M4L9mp6ufsxrnjlZnKA)

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

![](/files/-M4LAg3IhJFr5zJAmto7)

Find Google+ API and click on that.

![](/files/-M4LAvTsWb9-aB4Otcul)

Enable Google+ API.

![](/files/-M4LBK6atGcZeqZ8ME9o)

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

![](/files/-M4LDCZvl3QNarNVtNNE)

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

![](/files/-M4LDlW738JhZ5k6SpWY)

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

![](/files/-M4LEY8jl2ddo2pCqef9)

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

![](/files/-M4LGUVxzBeqsYeTLJ0e)

{% 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.

![](/files/-M4LHo4_VKSpbhmJ4mtS)

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