Mirrors agents/plugin from caelum0x/scribase: five new one-task skills covering the most common agent requests, a bumped plugin version, a license and privacy policy URL for directory submission, and a sync of the general scribase skill with the X-launch-post addition it was missing. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
3.2 KiB
name, description
| name | description |
|---|---|
| scribase-add-auth | Add or change sign-in on a Scribase project — email/password, native Apple or Google sign-in (signInWithIdToken) for a mobile app, or a web OAuth redirect — and read back users while debugging. Use when the user asks to add login, auth, sign-in, sign-up, "Sign in with Apple/Google", magic links, or wants to enable or configure an auth provider on an existing Scribase project. |
Scribase: add sign-in
The auth service is GoTrue-compatible: the app uses plain
supabase.auth.* from @supabase/supabase-js, unchanged.
1. Email and password (works with zero configuration)
await supabase.auth.signUp({ email, password })
await supabase.auth.signInWithPassword({ email, password })
2. Native Apple / Google sign-in (mobile, no browser redirect)
The mobile app exchanges a platform ID token for a Scribase session — no client secret ever ships in the app.
-
Save the provider's client id and turn it on. MCP: call
auth.config.setwithprovider(appleorgoogle) andprovider_config— for native sign-in only the client id is required (the iOS bundle id for Apple; the web/iOS client id(s) for Google):{ "provider": "apple", "provider_config": { "enabled": true, "client_id": "com.acme.app" } }Read the current settings and providers first with
auth.config.getif unsure what is already configured. Needs an owner- or admin-scoped token; if the current token lacks it, tell the user instead of trying a workaround. -
In the app:
// Apple (expo-apple-authentication) const credential = await AppleAuthentication.signInAsync({ requestedScopes: [AppleAuthentication.AppleAuthenticationScope.EMAIL], nonce: hashedNonce, // sha256 of rawNonce }) await supabase.auth.signInWithIdToken({ provider: 'apple', token: credential.identityToken!, nonce: rawNonce }) // Google (@react-native-google-signin/google-signin) const { data } = await GoogleSignin.signIn() await supabase.auth.signInWithIdToken({ provider: 'google', token: data!.idToken! })
3. Web OAuth redirect (signInWithOAuth)
Needs the provider's secret too (provider_config.secret, stored sealed and
never returned by auth.config.get) and the site's URL in the redirect
allow list (auth.config.set with settings.uri_allow_list).
await supabase.auth.signInWithOAuth({ provider: 'google', options: { redirectTo: 'https://app.example.com/auth/callback' } })
4. Never ask the user to paste a provider secret into the chat
If a client secret or Apple key is needed, tell the user the exact
auth.config.set call to make from a terminal they trust (or point them at
the console), never type the secret into this conversation for them.
5. Protect what signed-in users can see
A session alone grants nothing — every table still needs row level security
scoped to auth.uid(). See the scribase-write-rls-policy skill before
exposing any new table to signed-in users.
6. Debugging
auth.users (MCP) lists users without ever returning a secret. If a sign-in
is rejected, check auth.config.get for the provider's enabled flag and
the redirect allow list before assuming the client code is wrong.