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

# Google Authentication

> Configure how users authenticate and access the application using google

## Google Authentication Allow users to sign in with their Google accounts using OAuth 2.0.

### How It Works

1. User clicks "Sign in with Google"
2. User is redirected to Google's authentication page
3. After authenticating with Google, user is returned to the application
4. Upon successful validation, access is granted

### Configuration To enable Google authentication:

1. Create OAuth credentials in [Google Cloud Console](https://console.cloud.google.com/) Google Cloud Console: - Create a project (if you don't have one) - Configure
   OAuth consent screen - Create OAuth client ID (Web application) - Note your Client ID and Client Secret

   <div style={{ textAlign: "center" }}>
     <img src="https://mintcdn.com/pipeshub/fL87BB08juhhbs3T/images/auth/google/google_create_clientId.png?fit=max&auto=format&n=fL87BB08juhhbs3T&q=85&s=fd822367a20800e34d780a1428f539ab" alt="Google create credentials in console" width="90%" data-path="images/auth/google/google_create_clientId.png" />
   </div>

   <Warning>
     Redirect Uri in you Google Cloud Console should match exactly with the
     (your-app-url/auth/google/callback)

     <Info>
       For example - if your app is running on [https://f7f0-240.ngrok-free.app](https://f7f0-240.ngrok-free.app)
       then redirectUri should be
       [https://f7f0-240.ngrok-free.app/auth/google/callback](https://f7f0-240.ngrok-free.app/auth/google/callback) in Google Cloud
       Console.
     </Info>
   </Warning>

   <div style={{ textAlign: "center" }}>
     <img src="https://mintcdn.com/pipeshub/fL87BB08juhhbs3T/images/auth/google/google_redirectUri.png?fit=max&auto=format&n=fL87BB08juhhbs3T&q=85&s=792d877813e4c998c634eaf03078d2c6" alt="Google console redirect uri page" width="90%" data-path="images/auth/google/google_redirectUri.png" />
   </div>

   <Warning>
     Authorized Javascript Origin in you Google Cloud Console should match
     exactly with the (your-app-url)

     <Info>
       For example - if your app is running on [https://f7f0-240.ngrok-free.app](https://f7f0-240.ngrok-free.app)
       then authorized Javascript origin should be
       [https://f7f0-240.ngrok-free.app](https://f7f0-240.ngrok-free.app) in Google Cloud Console.
     </Info>
   </Warning>

   <div style={{ textAlign: "center" }}>
     <img src="https://mintcdn.com/pipeshub/fL87BB08juhhbs3T/images/auth/google/google_origin.png?fit=max&auto=format&n=fL87BB08juhhbs3T&q=85&s=0bace7b4f382868996162b43d8dd9336" alt="Google console origin" width="90%" data-path="images/auth/google/google_origin.png" />
   </div>

2. Navigate to Authentication Settings - Toggle on "Google" - Enter Client ID - Click "Save"
   <div style={{ textAlign: "center" }}>
     <img src="https://mintcdn.com/pipeshub/rV6WRyc2DiGnC8ma/images/auth/google/google_config.png?fit=max&auto=format&n=rV6WRyc2DiGnC8ma&q=85&s=50a150df4d4c3fbb4538dddec4b39afe" alt="Google configuration Dialog" width="90%" data-path="images/auth/google/google_config.png" />
   </div>
