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

# Social Auth

> Social Auth in Larafast

### GitHub

To use GitHub authentication you have to create the GitHub 0Auth application first.

Go to [https://github.com/settings/developers](https://github.com/settings/developers) and click "New 0Auth App"

Fill in your application information and click "Register Application"

[//]: # "<figure><img src=\"../.gitbook/assets/CleanShot 2024-03-15 at 17.46.02.png\" alt=\"\"><figcaption></figcaption></figure>"

For "Authorization callback URL" use `{your_website_url}/auth/callback/github`

e.g. [https://larafast.com/auth/callback/github](https://larafast.com/auth/callback/github)

Generate a new Client Secret and add Client ID and Client Secret to your .env file

### Twitter

Create a Twitter Developer account and add a new Project: [https://developer.twitter.com/en/portal/dashboard](https://developer.twitter.com/en/portal/dashboard)

After the project is added, create a new app, and copy from OAuth 2.0 Client ID and Client Secret your Client ID and Secret and add to your .env file

```dotenv .env theme={null}
TWITTER_CLIENT_ID=
TWITTER_CLIENT_SECRET=
```

Twitter Docs: [https://developer.twitter.com/en/docs/developer-portal/overview](https://developer.twitter.com/en/docs/developer-portal/overview)

### Google

Go to Google Console and create an organization: [https://console.cloud.google.com/](https://console.cloud.google.com/)

Once an organization is created go to Credentials and create a new 0Auth 2.0 Client\
[https://console.cloud.google.com/apis/credentials](https://console.cloud.google.com/apis/credentials)

[//]: # "<figure><img src=\"../.gitbook/assets/CleanShot 2024-03-15 at 17.56.21.png\" alt=\"\"><figcaption></figcaption></figure>"

Copy your Client ID and Client Secret to your .env file

[//]: # "<figure><img src=\"../.gitbook/assets/CleanShot 2024-03-15 at 17.56.56.png\" alt=\"\"><figcaption></figcaption></figure>"

```dotenv .env theme={null}
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
```

<Tip>
  For other social auth integrations check [https://socialiteproviders.com/](https://socialiteproviders.com/)
</Tip>

<Tip>
  Social Buttons can be found in \`resources/js/Components/Social/SocialButtons.vue
</Tip>

## Turning off Social Auth

If you decide that you don't want to allow your users to use social authentication then Larafast offers you the option to be able to disable all social logins through the configuration.

In your `.env` file find the `AUTH_USE_SOCIAL_AUTH` option and set it to default.

```dotenv .env theme={null}
AUTH_USE_SOCIAL_AUTH=false
```
