Magic
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
Import#
import { createAuthService } from '@saas-ui/auth/services/magic'
Usage#
If you haven't done so already install magic-sdk
.
yarn add magic-sdk
Setup AuthProvider#
import { Magic } from 'magic-sdk'import { AuthProvider } from '@saas-ui/react'import { createAuthService } from '@saas-ui/auth/services/magic'const magic = new Magic(process.env.MAGIC_API_KEY)function App({ children }) {return (<SaasProvider><AuthProvider {...createAuthService(magic)}>{children}</AuthProvider></SaasProvider>)}
That's it! Check the Auth documentation to see how to add authentication screens to your app.
Was this helpful?