apps/docs/content/guides/auth/social-login/auth-bitbucket.mdx
To enable Bitbucket Auth for your project, you need to set up a Bitbucket OAuth application and add the application credentials to your Supabase Dashboard.
Setting up Bitbucket logins for your application consists of 3 parts:
Login at the top right to log in.<$Partial path="social_provider_setup.mdx" variables={{ "provider": "Bitbucket" }} />
All WorkspacesSettings on the leftOAuth consumers on the left under Apps and Features (near the bottom)Add Consumer at the topNameCallback URL, type the callback URL of your appSave at the bottomKey (client_key) and Secret (client_secret) codes<$Partial path="social_provider_settings_supabase.mdx" variables={{ "provider": "BitBucket" }} />
<Tabs scrollable size="small" type="underlined" defaultActiveId="js" queryGroup="language"
<TabPanel id="js" label="JavaScript">
<$Partial path="create_client_snippet.mdx" />
When your user signs in, call signInWithOAuth() with bitbucket as the provider:
import { createClient } from '@supabase/supabase-js'
const supabase = createClient(
'https://your-project-id.supabase.co',
'sb_publishable_... or anon key'
)
// ---cut---
async function signInWithBitbucket() {
const { data, error } = await supabase.auth.signInWithOAuth({
provider: 'bitbucket',
})
}
When your user signs in, call signInWithOAuth() with bitbucket as the provider:
Future<void> signInWithBitbucket() async {
await supabase.auth.signInWithOAuth(
OAuthProvider.bitbucket,
redirectTo: kIsWeb ? null : 'my.scheme://my-host', // Optionally set the redirect link to bring back the user via deeplink.
authScreenLaunchMode:
kIsWeb ? LaunchMode.platformDefault : LaunchMode.externalApplication, // Launch the auth screen in a new webview on mobile.
);
}
When your user signs in, call signInWith(Provider) with Bitbucket as the Provider:
suspend fun signInWithBitbucket() {
supabase.auth.signInWith(Bitbucket)
}
<$Partial path="oauth_pkce_flow.mdx" />
<Tabs scrollable size="small" type="underlined" defaultActiveId="js" queryGroup="language"
<TabPanel id="js" label="JavaScript">
When your user signs out, call signOut() to remove them from the browser session and any objects from localStorage:
import { createClient } from '@supabase/supabase-js'
const supabase = createClient(
'https://your-project-id.supabase.co',
'sb_publishable_... or anon key'
)
// ---cut---
async function signOut() {
const { error } = await supabase.auth.signOut()
}
When your user signs out, call signOut() to remove them from the browser session and any objects from localStorage:
Future<void> signOut() async {
await supabase.auth.signOut();
}
When your user signs out, call signOut() to remove them from the browser session and any objects from localStorage:
suspend fun signOut() {
supabase.auth.signOut()
}