pwshub.com

Supabase Auth: Bring-your-own Auth0, Cognito, or Firebase

Supabase Auth: Bring-your-own Auth0, Cognito, or Firebase

Today we have 3 new announcements for Supabase Auth:

  1. Support for third-party Auth providers
  2. Phone-based Multi-factor Authentication (SMS and Whatsapp)
  3. New Auth Hooks for SMS and email

Let's dive into each new feature.

The headline feature today is third-party Authentication.

Supabase is a modular platform. We've been designing it so that you can choose which products you use with Postgres. You can use our own products (like Supabase Auth) or external products (like Auth0), and in theory the experience should be just-as-delightful.

Until today, using third-party auth products required developers to translate JWTs into a format compatible with Supabase Auth. This is difficult and unmaintainable.

So we fixed it. Today we're adding first-class support for the following third-party authentication products:

  1. Auth0
  2. AWS Cognito (standalone or via AWS Amplify)
  3. Firebase Auth

Migrating auth providers can be costly and technically challenging, especially for applications with large user bases. You can use Supabase's native auth offering alongside your third-party authentication provider to achieve a disruption-free migration.

All of the third-party providers are supported in the Supabase CLI, so you can evaluate, test, and develop your integration for free.

The Supabase client supports third-party auth like this:


_10

import { createClient } from '@supabase/supabase-js'

_10

_10

const supabase = createClient(SUPABASE_URL, SUPABASE_ANON_KEY, {

_10

accessToken: async () => {

_10

const accessToken = await auth0.getTokenSilently()

_10

return accessToken

_10

},

_10

})


We've extended MFA to support SMS and WhatsApp.

We have a strong conviction that all applications should have access to an open and secure authentication provider. Secure-by-default should not be a luxury: developers should have affordable access to security best-practices.

Almost two years ago we launched MFA with TOTP (app authenticator) free of charge. Since then, we've heard a common complaint from developers: app authenticators can be hard to adopt for non-techies. Phone-based MFA is for those developers who want to provide a more accessible MFA experience for their users.

The code looks like this:


_14

// Send an SMS or WhatsApp message to the user

_14

const { data: { challengeId } } = await supabase.auth.mfa.challenge({

_14

factorId,

_14

})

_14

_14

// To verify the code received by the user

_14

await supabase.auth.mfa.verify({

_14

factorId,

_14

challengeId,

_14

code: '123456',

_14

})

_14

_14

// The user's `aal` claim in the JWT

_14

// will be upgraded to aal2


We've added a few new Auth Hooks, which supports HTTP endpoints as a webhook now.

Email Hooks

We've heard the (rather loud) feedback that the built-in email templates (based on the Go templating language) can be limiting. There's been a lot of development in email rendering libraries like Resend's React Email. To help make this available for developers, we've added a "Send Email" Auth Hook, which you can use to customize your emails and how they are sent.

SMS Hooks

Supabase Auth has built-in support for popular SMS sending providers like Twilio, Messagebird, Textlocal and Vonage, but we realize this choice can be limiting.

Today we're launching a new "Send SMS" Auth Hook. You no longer need to use the built-in provider - you can implement your own by specifying a HTTP endpoint that receives a POST request when a message needs to be sent.

Check out the docs for more details on how to get started:

  • Third-party Authentication
  • Multi-factor Authentication
  • Auth Hooks

Source: supabase.com

Related stories
1 month ago - There's always a lot to cover in Launch Weeks. Here are the top 10, ranked by my own statistical reasoning. #10 Snaplet is now open source Snaplet...
1 month ago - Supabase offers comprehensive features that make it easy for frontend devs to build complex backends and focus on crafting exceptional UIs. The post Supabase adoption guide: Overview, examples, and alternatives appeared first on LogRocket...
1 week ago - Learn how to handle real-time geospatial data using Supabase Realtime and Flutter.
1 month ago - Hey folks. We're excited to share David's new guide to learning Supabase. He's spent a year working on it and we think it's one of the most thorough...
1 month ago - As the Supabase community has grown, so has demand for a diverse collection of client libraries and framework specific SDKs. This demand for the...
Other stories
2 hours ago - Ubuntu 24.10 ‘Oracular Oriole’ is released on October 13th, and as you’d expect from a new version of Ubuntu, it’s packed with new features. As a short-term release, Ubuntu 24.10 gets 9 months of ongoing updates, security patches, and...
4 hours ago - Did you know that CSS can play a significant role in web accessibility? While CSS primarily handles the visual presentation of a webpage, when you use it properly it can enhance the user’s experience and improve accessibility. In this...
5 hours ago - Design thinking workshops are your key to turning big problems into clear solutions. In this blog, I share how to run them efficiently and keep your team aligned. The post How to run a design thinking workshop appeared first on LogRocket...
5 hours ago - New memory-optimized X8g instances offer up to 3 TiB DDR5 memory, 192 vCPUs, and 50 Gbps network bandwidth, designed for memory-intensive workloads like databases, analytics, and caching with unparalleled price/performance and efficiency.
5 hours ago - Gain indispensable data engineering expertise through a hands-on specialization by DeepLearning.AI and AWS. This professional certificate covers ingestion, storage, querying, modeling, and more.