new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Supabase · Auth · all subjects

oauth providers/twitter

9 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

X/Twitter OAuth 2.0 is recommended over OAuth 1.0a

Supabase recommends using the X/Twitter (OAuth 2.0) provider. The legacy Twitter (OAuth 1.0a) provider will be deprecated in future releases.

Three steps to set up X/Twitter OAuth with Supabase

Setting up X/Twitter logins consists of three parts: create and configure an X Project and App on the X Developer Dashboard at developer.x.com; add your X OAuth 2.0 Client ID and Client Secret to your Supabase Project in the dashboard; add the login code to your Supabase JS Client App.

How to create X OAuth app and obtain credentials

Click + Create Project on X Developer Dashboard, enter project name and proceed through use case and description. Enter an app name. Copy API Key and API Secret Key (used for deprecated OAuth 1.0a). Click App settings. At the bottom find User authentication settings and click Set up. Under User authentication settings, turn ON "Request email from users". Select Web App as Type of App. Configure App info with Callback URL, Website URL, Terms of service URL, and Privacy policy URL, then Save. Navigate to Keys and tokens, scroll to bottom, copy Client ID, click Regenerate next to Client Secret, confirm regeneration, and copy the new Client Secret.

Configure X/Twitter OAuth 2.0 in Supabase via Management API

Use the PATCH endpoint https://api.supabase.com/v1/projects/{PROJECT_REF}/config/auth with Bearer token authorization. Set the following JSON body fields: external_x_enabled (boolean, set to true), external_x_client_id (string, your X Client ID), external_x_secret (string, your X Client Secret).

JavaScript example: sign in with X/Twitter

Call supabase.auth.signInWithOAuth() with provider set to 'x': async function signInWithX() { const { data, error } = await supabase.auth.signInWithOAuth({ provider: 'x', }) }

Flutter example: sign in with X/Twitter

Call supabase.auth.signInWithOAuth() with OAuthProvider.x: Future<void> signInWithX() async { await supabase.auth.signInWithOAuth( OAuthProvider.x, redirectTo: kIsWeb ? null : 'my.scheme://my-host', authScreenLaunchMode: kIsWeb ? LaunchMode.platformDefault : LaunchMode.externalApplication, ); }

Swift example: sign in with X/Twitter

Call supabase.auth.signInWithOAuth(provider:) with .x as the provider: func signInWithX() async throws { try await supabase.auth.signInWithOAuth(provider: .x) }

Kotlin example: sign in with X/Twitter

Call supabase.auth.signInWith() with X as the Provider: suspend fun signInWithX() { supabase.auth.signInWith(X) }

C# example: sign in with X/Twitter

Call supabase.Auth.SignIn() with Provider.Twitter as the provider: var state = await supabase.Auth.SignIn(Provider.Twitter); var signInUrl = state.Uri;

Give your agent this brain