Flutter: Sign in a user through OAuth

Signs the user in using third-party OAuth providers.

Parameters

Examples

Sign in using a third-party provider

await supabase.auth.signInWithOAuth(OAuthProvider.github);

With `redirectTo`

await supabase.auth.signInWithOAuth(
  OAuthProvider.github,
  redirectTo: kIsWeb ? null : 'io.supabase.flutter://reset-callback/',
);

With scopes

await supabase.auth.signInWithOAuth(
  OAuthProvider.github,
  scopes: 'repo gist notifications'
);
...
// after user comes back from signin flow

final Session? session = supabase.auth.currentSession;
final String? oAuthToken = session?.providerToken;