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

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.

Slack OAuth provider setup overview

Setting up Slack logins for a Supabase application consists of three parts: create and configure a Slack Project and App on the Slack Developer Dashboard, add the Slack API Key and API Secret Key to the Supabase Project dashboard, and add the login code to the Supabase JS Client App.

Slack provider migration from OAuth to OIDC

Supabase is replacing the existing Slack provider with a new Slack (OIDC) provider. Developers with Slack OAuth Applications created prior to June 24, 2024 should create a new application and migrate their credentials from the Slack provider to the Slack (OIDC) provider. Existing OAuth Applications built with the old Slack provider will continue to work until October 10, 2024.

Slack OIDC app creation steps

To create a Slack OAuth app: go to api.slack.com, click Create New App, select From scratch, type the app name, select the Slack Workspace, and click Create App. Then under App Credentials, copy the Client ID and Client Secret. Navigate to OAuth & Permissions in the sidebar, find Redirect URLs, click Add New Redirect URL, paste the callback URL, click Add, and click Save URLs.

Slack OIDC required scopes

For Slack OIDC authentication, add the following scopes under User Token Scopes: profile, email, openid. These are the default scopes that Supabase Auth uses to request user information. Do not add other scopes as Sign In With Slack only supports profile, email, and openid.

Configure Slack OIDC via Management API

The Slack (OIDC) auth provider can be configured using the Management API with a PATCH request to https://api.supabase.com/v1/projects/{PROJECT_REF}/config/auth. The request requires Authorization header with Bearer token and Content-Type application/json. The payload must include external_slack_oidc_enabled (boolean), external_slack_oidc_client_id (string), and external_slack_oidc_secret (string).

JavaScript Slack OIDC sign-in example

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

Flutter Slack sign-in example

Future<void> signInWithSlack() async { await supabase.auth.signInWithOAuth( OAuthProvider.slack, 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. ); }

Kotlin Slack OIDC sign-in example

suspend fun signInWithSlack() { supabase.auth.signInWith(SlackOIDC) }

C# Slack sign-in example

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

Give your agent this brain