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 · all subjects

authentication & auth flows

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

API error code PGRST300 - no active JWT secret

PostgREST error code PGRST300 returns HTTP status 500 and indicates PostgREST does not have an active JWT secret to validate requests.

API error code PGRST301 - invalid JWT

PostgREST error code PGRST301 returns HTTP status 401 and indicates the provided JWT couldn't be decoded or it is invalid.

API error code PGRST303 - JWT claims validation failure

PostgREST error code PGRST303 returns HTTP status 401 and indicates JWT claims validation or parsing failed.

API error code PGRST302 - missing Auth header with anonymous role disabled

PostgREST error code PGRST302 returns HTTP status 401 and indicates an attempted request without the header 'Auth: Bearer' when the anonymous role is disabled.

Swift Package Manager setup for Supabase in Xcode

To add the Supabase Swift package in Xcode, navigate to File > Add Package Dependencies, enter the repository URL https://github.com/supabase/supabase-swift in the search bar, and make sure to add the Supabase product package as a dependency to your application target.

Deep linking setup for iOS authentication

To implement authentication features like magic links or OAuth in iOS apps, you need to set up deep links to redirect users back to your app. This requires configuring custom URL schemes for your iOS app as detailed in the deep linking guide for Swift.

Supabase iOS Swift package repository URL

The supabase-swift package is installed via Swift Package Manager using the repository URL https://github.com/supabase/supabase-swift.

Initialize Supabase client in Swift

Initialize a Supabase client by creating a SupabaseClient instance with your project URL and publishable key. The initialization code is: let supabase = SupabaseClient(supabaseURL: URL(string: "YOUR_SUPABASE_URL")!, supabaseKey: "YOUR_SUPABASE_PUBLISHABLE_KEY"). The supabaseURL and supabaseKey can be obtained from the project Connect panel in the dashboard.

Install Laravel Breeze for authentication templates

Use 'composer require laravel/breeze --dev' followed by 'php artisan breeze:install blade' to install Laravel Breeze. When prompted, pass a stack name such as 'blade', 'react', or 'vue'. Breeze ships migrations for authentication features.

Laravel uses its own authentication, not Supabase Auth

Laravel Breeze implements Laravel's own authentication system rather than Supabase Auth. Users are stored in Laravel's users table, not in Supabase Auth.

Server-Side Auth helpers

Supabase provides helpers for implementing user authentication in popular server-side languages and frameworks like Next.js, SvelteKit, and Remix.

Phone login authentication

Supabase Auth supports phone logins using a third-party SMS provider.

Passwordless login via magic links

Supabase Auth allows you to build passwordless logins via magic links for your application or website.

CAPTCHA protection for authentication forms

Supabase Auth supports adding CAPTCHA protection to sign-in, sign-up, and password reset forms.

Studio Single Sign-On for dashboard access

Supabase Studio allows you to login to the Supabase dashboard via SSO (Single Sign-On).

Email login authentication

Supabase Auth supports building email logins for your application or website.

Flutter deep links setup for authentication

Many sign-in methods require deep links to redirect the user back to your app after authentication. Deep links must be configured for all platforms including web, and detailed instructions are available in the Flutter Mobile Guide.

Hono request-scoped Supabase client with auth

The middleware in src/middleware/auth.middleware.ts creates a request-scoped Supabase client. Use `getSupabase(c)` to get a client that already carries the signed-in user's auth token, so RLS policies apply automatically to queries.

Allow public access to instruments page in with-supabase template

Update `lib/supabase/proxy.ts` to skip authentication redirect for the `/instruments` route by adding conditions `request.nextUrl.pathname !== "/instruments" && !request.nextUrl.pathname.startsWith("/instruments/")` to the existing if statement that redirects unauthenticated users.

Give your agent this brain