> ## Documentation Index
> Fetch the complete documentation index at: https://nocode-docs.zeroagent.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Social

Social Connections are variety of built-in authentication methods that you can readily enable and configure. These methods offer secure and convenient ways for users to access your platform.

## Setup Client OAuth Redirect URI

You must add your **client application url in OAuth Redirect Uri** under projects settings in dashboard. This is the uri where your success response will be appended as query params and you can parse this response in your client application.

<Note>
  It is mandatory to add OAuth Redirect Uri for your social authentication method flow to work properly.
</Note>

**Step-1 :** Open your **Project Settings** in your dashboard.

<img src="https://mintcdn.com/zeromagiclabsprivatelimited/FNI2lo67ZZ_e31YS/assets/images/project-console.png?fit=max&auto=format&n=FNI2lo67ZZ_e31YS&q=85&s=0dc1a36bdf1183a8e10932353b541cfd" alt="project-console" width="460" height="171" data-path="assets/images/project-console.png" />

**Step-2 :** Add your Client Application Url in **OAuth Redirect Uri** under your project settings. Here we are adding `http://localhost:3000/dashboard` as our client application url. You can add your client application url endpoint path where you want to receive your success response.

<img src="https://mintcdn.com/zeromagiclabsprivatelimited/FNI2lo67ZZ_e31YS/assets/learn/authentication-add-googleoauth-setup.png?fit=max&auto=format&n=FNI2lo67ZZ_e31YS&q=85&s=6c5b977de3289b2671fac49ab0395cbd" alt="Redirect URL" width="1868" height="925" data-path="assets/learn/authentication-add-googleoauth-setup.png" />

> Note : The access\_token and other user details will be appended as query params in your client application url. You can parse this response in your client application.

## Create Social Connection

You can start creating connection within just few clicks. Follow the steps below steps to start creating a connection.

### Connection 1: Google Auth

1. Go to the Google Developers Console and [Create a new project](https://console.cloud.google.com/projectcreate).

   <img src="https://mintcdn.com/zeromagiclabsprivatelimited/FNI2lo67ZZ_e31YS/assets/learn/googleoauth-setup-project-create.png?fit=max&auto=format&n=FNI2lo67ZZ_e31YS&q=85&s=00fe955fde8f41b0507d85e04275e889" alt="Create a new project" width="1805" height="928" data-path="assets/learn/googleoauth-setup-project-create.png" />

2. Click on the project name and then select `APIs & Services` on your left sidebar tab. Click on `OAuth consent screen` and fill in the required details.

   <img src="https://mintcdn.com/zeromagiclabsprivatelimited/FNI2lo67ZZ_e31YS/assets/learn/googleoauth-setup-oauthconsent-1.png?fit=max&auto=format&n=FNI2lo67ZZ_e31YS&q=85&s=321e8509183081cd0204ef2f16ba8594" alt="OAuth consent screen" width="1813" height="924" data-path="assets/learn/googleoauth-setup-oauthconsent-1.png" />

   <Note>
     IMPORTANT

     **Test users**: While your app is in development, you can add test users to your OAuth consent screen. **These users will be able to sign in to your app with their Google accounts** without needing to verify their identity. You can add test users by clicking on the `Add users` button in the OAuth consent screen configuration page.

     > You will need to verify and move your app to production before it can be used by anyone other than the test users you have added.
   </Note>

   <img src="https://mintcdn.com/zeromagiclabsprivatelimited/FNI2lo67ZZ_e31YS/assets/learn/googleoauth-setup-oauthconsent-2.png?fit=max&auto=format&n=FNI2lo67ZZ_e31YS&q=85&s=b255252a6aef8b7cedb9d77c9699c4ca" alt="OAuth consent screen" width="1810" height="923" data-path="assets/learn/googleoauth-setup-oauthconsent-2.png" />

3. Click on `Credentials` on your left sidebar tab and then click on `Create Credentials` and select `OAuth client ID`.

   <img src="https://mintcdn.com/zeromagiclabsprivatelimited/FNI2lo67ZZ_e31YS/assets/learn/googleoauth-setup-create-credentials.png?fit=max&auto=format&n=FNI2lo67ZZ_e31YS&q=85&s=19096a43f0ff2e07c5d73ba9dd4c5e1a" alt="Create Credentials" width="1817" height="951" data-path="assets/learn/googleoauth-setup-create-credentials.png" />

   <Note>
     SERVER CONFIGURATIONS

     Application URL - [http://localhost:3000](http://localhost:3000)

     > We are using `http://localhost:3000` as the frontend application URL in **Authorized origins**. You can replace it with your actual ReactJS application URL when rolling out to production. Example: `https://your-reactjs-app.com`

     Oauth Callback or Authorized Redirect URI - [https://authn.zeromagic.cloud/oauth/callback/](https://authn.zeromagic.cloud/oauth/callback/)
   </Note>

4. Copy the `Client ID` and `Client Secret` and we will use this to setup our authentication in the zeromagic platform.

5. Add the `Google` authentication connection under Methods. Click `Add Connection` to create a new connection with the `Client ID` and `Client Secret` you copied from the Google Developers Console.

   <img src="https://mintcdn.com/zeromagiclabsprivatelimited/FNI2lo67ZZ_e31YS/assets/learn/authentication-add-googleoauth.png?fit=max&auto=format&n=FNI2lo67ZZ_e31YS&q=85&s=1a26af1fd344309a6753f53c05eaf91f" alt="Add Authentication" width="1862" height="920" data-path="assets/learn/authentication-add-googleoauth.png" />

6. Now, go to `Environments` sections and select the environment you created. Copy the `Auth Endpoint URL` from the environment details. This is your authentication endpoint URL where you will be sending the APi requests. Your Auth endpoint URL looks similar to this:

   The oauth api endpath is **/oauth** and environment url **[http://authn.zeromagic.cloud/auth/86165f63f34e4be89809c2948c424a99/development/](http://authn.zeromagic.cloud/auth/86165f63f34e4be89809c2948c424a99/development/)**. So, the final URL will be

   ```curl OAuth Endpoint theme={null}
   http://authn.zeromagic.cloud/auth/86165f63f34e4be89809c2948c424a99/development/oauth  
   ```

## Supported Social Providers

The list of supported social authentication methods

| Provider     | Followed Protocol |
| ------------ | ----------------- |
| Google       | OAuth2            |

## Oauth Callback URL

Make sure to configure the below given call back URL in the third party service

<Note>
  Callback url : `https://authn.zeromagic.cloud/oauth/callback/`
</Note>
