7.5.0 โ€ข Published 2 years ago

@streambird/react-native v7.5.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

โœจ 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.

๐Ÿ“– 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' });