Sign in a user through OAuth
Log in an existing user via a third-party provider. This method supports the PKCE flow.
- This method is used for signing in using a third-party provider.
- Supabase supports many different third-party providers.
Parameters
credentials
REQUIRED
SignInWithOAuthCredentialsprovider
REQUIRED
ProviderOne of the providers supported by GoTrue.
options
Optional
objectqueryParams
Optional
objectAn object of query params
redirectTo
Optional
stringA URL to send the user to after they are confirmed.
scopes
Optional
stringA space-separated list of scopes granted to the OAuth application.
skipBrowserRedirect
Optional
booleanIf set to true does not immediately redirect the current browser context to visit the OAuth authorization page for the provider.
const { data, error } = await supabase.auth.signInWithOAuth({
provider: 'github'
})