@magic-sdk/react-native

Passwordless authentication for React Native.

Usage no npm install needed!

<script type="module">
  import magicSdkReactNative from 'https://cdn.skypack.dev/@magic-sdk/react-native';
</script>

README

✨ Magic Authentication JavaScript SDK

<MagicLabs>

Magic empowers developers to protect their users via an innovative, passwordless authentication flow without the UX compromises that burden traditional OAuth implementations.

License · Changelog · Contributing Guide

📖 Documentation

See the developer documentation to learn how you can master the Magic SDK in a matter of minutes.

🔗 Installation

Integrating your app with Magic will require our client-side NPM package:

# Via NPM:
npm install --save @magic-sdk/react-native

# Via Yarn:
yarn add @magic-sdk/react-native

⚡️ Quick Start

Sign up or log in to the developer dashboard to receive API keys that will allow your application to interact with Magic's authentication APIs.

Then, you can start authenticating users with just one method!

import React from 'react';
import { Magic } from '@magic-sdk/react-native';

const magic = new Magic('YOUR_API_KEY');

export default function App() {
  return <>
    {/* Render the Magic iframe! */}
    <magic.Relayer />
    {...}
  </>
}

// Somewhere else in your code...
await magic.auth.loginWithMagicLink({ email: 'your.email@example.com' });