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

# OAuth overview

> Identity providers (IdPs), like Google, Apple, and GitHub, maintain user identity information and offer authentication services to developers and applications, so called relying parties.

![OAuth consent start screen](https://mintcdn.com/stytch-34ca0595/jCmOQoXV28mXNOhP/images/consumer/from-old-docs/oauth-diagram-light.svg?fit=max\&auto=format\&n=jCmOQoXV28mXNOhP\&q=85\&s=b823527aef27dcc2371545db21311a74)

This lets your users use a Single Sign-On (SSO) to login to your app without going through the extra step of creating an identity directly with your app.

In addition to offering identity management, IdPs often expose extensive functionality in their platform via API, e.g. reading and creating Google Calendar events or creating repos within GitHub. When you use Stytch OAuth, we automatically initiate a session with the IdP and return the necessary tokens to build on top of the provider's API.

## Identity provider details

Even though OAuth is a standard, IdPs can sometimes vary in data models and nomenclature within their own implementations. Stytch normalizes values and behavior as much as possible to ensure that you have a smooth integration with whichever providers you use.

The list below lists each OAuth provider we support and lets you know which values you should expect to see returned for each provider and the default session length. "—" indicates that the value is not applicable to the provider in question.

| Provider | `access_token` | `refresh_token` | `jwt` | Session length |
| - | - | - | - | - |
| Google | Returned | Returned | Returned\* | 1 hour |
| Amazon | Returned | Returned | — | 24 hours |
| Apple | Returned | Returned | — | Until revoked |
| Bitbucket | Returned | Returned | — | 2 hours |
| Coinbase | Returned | Returned | — | 2 hours |
| Discord | Returned | Returned | — | 7 days |
| Facebook (Meta) | Returned | — | — | 2 months |
| GitHub | Returned | — | — | Until revoked |
| GitLab | Returned | Returned | — | 2 hours |
| LinkedIn | Returned | Returned | — | 60 days |
| Microsoft | Returned | Returned\* | — | 60-90 minutes |
| Salesforce | Returned | — | — | Until revoked |
| Slack | Returned | — | — | Until revoked |
| Twitch | Returned | Returned | — | 60 days |
| Yahoo | Returned | Returned | Returned | 1 hour |

> [accordion] Google
>
> Google offers two pathways for a user to authenticate, a traditional OAuth flow with a consent pane, or via Google One Tap. If a user enters through the Google One Tap flow, you will only receive a `jwt` and no `access_token` or `refresh_token`; you will not be able to leverage Google's API.
>
> **Default Scopes**
>
> * `open_id`
> * `email`
> * `profile`
>
> **Resources**
>
> * [Stytch API reference](https://stytch.com/docs/api-reference/consumer/api/oauth/start/google.md)
> * [Gmail API documentation](https://developers.google.com/gmail/api/reference/rest)

> [accordion] Amazon
>
> Log in with Amazon lets users log in with their Amazon customer accounts and offers data like name, email address, and zip code to build a more personalized experience.
>
> **Default Scopes**
>
> * `profile`
>
> **Resources**
>
> * [Stytch API reference](https://stytch.com/docs/api-reference/consumer/api/oauth/start/amazon.md)
> * [Amazon API documentation](https://developer.amazon.com/docs/login-with-amazon/customer-profile.html)

> [accordion] Apple
>
> Allow your users to log in with their Apple accounts. Apple does not offer any additional scopes. Note that Apple allows users to obfuscate their email address, and you may receive an email address like `h79gps7k78@privaterelay.appleid.com`. See the Resources section below to learn more.
>
> **Default Scopes**
>
> * `name`
> * `email`
>
> **Resources**
>
> * [Stytch API reference](https://stytch.com/docs/api-reference/consumer/api/oauth/start/apple.md)
> * [Apple API documentation](https://developer.apple.com/documentation/sign_in_with_apple)

> [accordion] Bitbucket
>
> Log in with Bitbucket let's you build exciting tools on top of Atlassian's Bitbucket source control product.
>
> **Default Scopes**
>
> * `account`
> * `email`
>
> **Resources**
>
> * [Stytch API reference](https://stytch.com/docs/api-reference/consumer/api/oauth/start/bitbucket.md)
> * [Bitbucket API documentation](https://developer.atlassian.com/cloud/bitbucket/rest/intro/)

> [accordion] Coinbase
>
> Log in with Coinbase let's users easily and securely sign in to your app and lets you integrate Coinbase supported cryptocurrencies into your applications.
>
> **Default Scopes**
>
> * `account`
> * `email`
>
> **Resources**
>
> * [Stytch API reference](https://stytch.com/docs/api-reference/consumer/api/oauth/start/coinbase.md)
> * [Coinbase API documentation](https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/permissions-scopes)

> [accordion] Discord
>
> Discord OAuth login allows users to log into your app with their Discord account.
>
> **Default Scopes**
>
> * `identify`
> * `email`
>
> **Resources**
>
> * [Stytch API reference](https://stytch.com/docs/api-reference/consumer/api/oauth/start/discord.md)
> * [Discord API documentation](https://discord.com/developers/docs/topics/oauth2#shared-resources-oauth2-scopes)

> [accordion] Facebook
>
> Facebook OAuth login allows users to log into your app with their Facebook account.
>
> **Default Scopes**
>
> * `public_profile`
> * `email`
>
> **Resources**
>
> * [Stytch API reference](https://stytch.com/docs/api-reference/consumer/api/oauth/start/facebook.md)
> * [Facebook API documentation](https://developers.facebook.com/docs/graph-api/overview)

> [accordion] GitHub
>
> GitHub OAuth login allows users to log into your app with their GitHub account.
>
> **Default Scopes**
>
> * `user:email`
>
> **Resources**
>
> * [Stytch API reference](https://stytch.com/docs/api-reference/consumer/api/oauth/start/github.md)
> * [GitHub API documentation](https://docs.github.com/en/developers/overview/about-githubs-apis)

> [accordion] GitLab
>
> GitLab OAuth login allows users to log into your app with their GitLab account.
>
> **Default Scopes**
>
> * `open_id`
> * `email`
> * `profile`
>
> **Resources**
>
> * [Stytch API reference](https://stytch.com/docs/api-reference/consumer/api/oauth/start/gitlab.md)
> * [GitLab API documentation](https://docs.gitlab.com/ee/api/)

> [accordion] LinkedIn
>
> LinkedIn OAuth login allows users to log into your app with their LinkedIn account.
>
> **Default Scopes**
>
> * `r_liteprofile`
> * `r_emailaddress`
>
> **Resources**
>
> * [Stytch API reference](https://stytch.com/docs/api-reference/consumer/api/oauth/start/linkedin.md)
> * [LinkedIn API documentation](https://learn.microsoft.com/en-us/linkedin/consumer/integrations/self-serve/share-on-linkedin?context=linkedin%2Fconsumer%2Fcontext)

> [accordion] Microsoft
>
> Log in with Microsoft helps your users sign in easily with their corporate or person Microsoft accounts and lets you leverage Microsoft's Graph API.
>
> **Default Scopes**
>
> * `open_id`
> * `email`
> * `profile`
>
> **Resources**
>
> * [Stytch API reference](https://stytch.com/docs/api-reference/consumer/api/oauth/start/microsoft.md)
> * [Microsoft API documentation](https://docs.microsoft.com/en-us/graph/)

> [accordion] Salesforce
>
> Log in with Salesforce let's your users log in with their Salesforce accounts.
>
> **Default Scopes**
>
> * `id`
> * `openid`

> [accordion] Slack
>
> Log in with Slack let's your users log in with their Slack accounts.
>
> **Default Scopes**
>
> * `openid`
> * `email`
> * `profile`

> [accordion] Twitch
>
> Log in with Twitch let's your users log in with their Twitch accounts.
>
> **Default Scopes**
>
> * `account`
> * `email`

> [accordion] Yahoo
>
> Log in with Yahoo let's your users log in with their Yahoo accounts.
>
> **Default Scopes**
>
> * `account`
> * `email`
> * `profile`
