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/github

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

GitHub OAuth setup overview

Setting up GitHub logins for your application consists of 3 parts: Create and configure a GitHub OAuth App on GitHub, add your GitHub OAuth keys to your Supabase Project, and add the login code to your Supabase JS Client App.

GitHub OAuth app registration steps

Navigate to https://github.com/settings/developers, click Register a new application (or New OAuth App if you've created one before). Fill in: Application name (your app name), Homepage URL (full URL to your app's website), and Authorization callback URL (your app's callback URL). Leave Enable Device Flow unchecked. Click Register Application. Then copy your Client ID, click Generate a new client secret, and copy and save your Client secret.

Configure GitHub auth provider via Management API

Send a PATCH request to https://api.supabase.com/v1/projects/{PROJECT_REF}/config/auth with Authorization Bearer token header and Content-Type application/json. The JSON body must include: external_github_enabled (boolean), external_github_client_id (string), and external_github_secret (string). Access token is obtained from https://supabase.com/dashboard/account/tokens.

JavaScript GitHub OAuth sign-in example

import { createClient } from '@supabase/supabase-js' const supabase = createClient('https://your-project-id.supabase.co', 'sb_publishable_...') async function signInWithGithub() { const { data, error } = await supabase.auth.signInWithOAuth({ provider: 'github', }) }

Flutter GitHub OAuth sign-in example

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

Swift GitHub OAuth sign-in example

func signInWithGithub() async throws { try await supabase.auth.signInWithOAuth( provider: .github, redirectTo: URL(string: "my-custom-scheme://my-app-host") ) }

Kotlin GitHub OAuth sign-in example

suspend fun signInWithGithub() { supabase.auth.signInWith(Github) }

C# GitHub OAuth sign-in example

var state = await supabase.Auth.SignIn(Provider.Github); var signInUrl = state.Uri;

Give your agent this brain