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

# Google

> Integrate Google Single Sign-On with Nile Auth

**1. Setup Google Developer Console**

1. Create a [Google Developer](https://console.developers.google.com/) account.
2. Follow the documentation for [creating an OAuth 2.0 Client ID](https://developers.google.com/identity/protocols/oauth2) in Google.
3. Obtain a **Client ID** and **Client Secret** from [Google OAuth](https://console.cloud.google.com/apis/credentials).
   Be sure to set the redirect URL to your application handling the Nile Auth requests.
   If you are running locally and used the routes generated by `@niledatabase/server`, the redirect URL is `http://localhost:3000/api/auth/callback/google`.

> [accordion] Google dashboard example
>
> ![Google SSO](https://mintcdn.com/nile/6B-b9nH3DSiJ_Uwi/images/auth/googleexample.png?fit=max\&auto=format\&n=6B-b9nH3DSiJ_Uwi\&q=85\&s=c49fcaa86747557364e78a88a181106b)

**2. Save Client ID and Client Secret in Nile**

Save them to your database at `console.thenile.dev` under Google in **Tenants
& Users -> Configuration** ![Google configuration on
console.thenile.dev](https://mintcdn.com/nile/ZhObK_CvFMgzM-yj/images/singlesignon/google.png?fit=max\&auto=format\&n=ZhObK_CvFMgzM-yj\&q=85\&s=dedcb3b64eac743830a7b664fdc6524b)

**3. Add the `Google` button to your login page**

The button will redirect the user to Google for authentication. Upon successful authentication, the user will be redirected back to your application.

```jsx theme={null}
import { Google } from '@niledatabase/react';

function App() {
  return (
    <div>
      <Google callbackUrl="/" />
    </div>
  );
}
```

## Related Providers

* [GitHub SSO](https://thenile.dev/docs/auth/singlesignon/github.md)
* [Microsoft SSO](https://thenile.dev/docs/auth/singlesignon/microsoft.md)
* [Discord SSO](https://thenile.dev/docs/auth/singlesignon/discord.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.