Integrating Magic authentication with Saas UI.

This integration allows you to connect Magic with the Saas UI auth screens and provider.

Supported authentication strategies are:

  • Magic link


yarn add magic-sdk @saas-ui/magic


If you haven't done so already install magic-sdk.

yarn add @saas-ui/auth @saas-ui/magic magic-sdk

Setup AuthProvider#

import { Magic } from 'magic-sdk'
import { AuthProvider } from '@saas-ui/auth'
import { createAuthService } from '@saas-ui/magic'
const magic = new Magic(process.env.MAGIC_API_KEY)
function App({ children }) {
return (
<AuthProvider {...createAuthService(magic)}>{children}</AuthProvider>

That's it! Check the Auth documentation to see how to add authentication screens to your app.

Was this helpful?