Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Supabase 9 min read How-to mediumAdept

Getting started with React Native authentication

Supabase Auth can be wired into an Expo/React Native app by configuring supabase-js with AsyncStorage for session persistence and disabling URL session detection. Sessions can optionally be encrypted with an AES-256 key held in Expo SecureStore, which works around SecureStore's 2048-byte limit. The guide includes code for email/password sign-in, plus OAuth and magic-link flows that rely on a custom URL scheme, deep linking and setSession from the redirect tokens. Sign in with Apple, Google sign-in and SMS/WhatsApp OTP get only brief mentions, with pointers to the docs.

Related posts

  • React Native file upload with Supabase Storage

    Supabase mediumAdept

    A React Native app built with Expo SDK 49 and Expo Router v2 can sign users in with Supabase Auth and upload images to a private Supabase Storage bucket. A Postgres storage policy restricts each user to a folder named after their auth UID. The Supabase client persists sessions in AsyncStorage, and an AuthProvider context built on onAuthStateChange redirects between login and protected routes. Upload works by reading the image-picker URI as base64 with expo-file-system, decoding it to an ArrayBuffer and calling storage upload().

  • Supabase Flutter SDK 1.0 Developer Preview

    Supabase mediumAdept

    Supabase Flutter SDK 1.0 enters developer preview with a focus on developer experience. Auth state persistence and deep link handling now happen automatically on initialization, replacing the removed SupabaseAuthState and SupabaseAuthRequiredState classes. Errors are now thrown instead of returned, since Dart lacks destructuring, and `.execute()` is deprecated so queries resolve directly to data. Deep links now work on macOS and Windows through app_links, Multiplayer realtime support is planned for the stable release, and a new Supabase Auth UI package provides prebuilt email, magic link and social login widgets.

  • Supabase Auth: SSO, Mobile, and Server-side support

    Supabase mediumAdept

    Supabase Auth adds SAML 2.0 single sign-on, a PKCE authorization flow for server-side rendering and mobile apps, and native Sign in with Apple on iOS. SSO providers are managed with new `supabase sso` CLI commands, and the provider identifier in the JWT can drive Postgres Row Level Security policies for multi-tenant isolation. PKCE replaces the implicit grant flow, which exposed tokens in URL fragments that servers can't read and that malicious mobile apps could intercept. It does this with a hashed code verifier and challenge, so an intercepted authorization code is useless on its own. Enabling it means setting `flowType: 'pkce'` in supabase-js, and a Next.js callback route exchanges the code for a session.

  • Securing your Flutter apps with Multi-Factor Authentication

    Supabase mediumAdept

    A Flutter app can require TOTP-based multi-factor authentication on top of email/password sign-in using Supabase Auth. The walkthrough covers setting up supabase_flutter and go_router, configuring iOS and Android deep links for email confirmation callbacks, and building signup, enrollment and login-verification pages. Enrollment calls mfa.enroll() to get a QR code and secret, then runs mfa.challenge() and mfa.verify() with the 6-digit code and refreshes the session. Login follows signInWithPassword() with a verification step before the user can reach protected content.

  • Authentication in Ionic Angular with Supabase

    Supabase mediumAdept

    An Ionic Angular realtime messaging app built on Supabase demonstrates email/password signup and login, magic link authentication for web and native mobile, and route protection with Angular guards. The Postgres side defines users, groups and messages tables, adds Row Level Security policies so the public anon key is safe in the frontend, uses a security-definer trigger to copy new auth users into a public table, and publishes the messages table for realtime inserts. On the client, an AuthService wraps supabase.auth and tracks session state in an RxJS BehaviorSubject, loading the stored session with getUser() at startup because onAuthStateChange usually doesn't fire on app load. Most of the logic applies to any Angular web project.

The quest for software engineering knowledge.

Look:
Layout: