0.0.1 • Published 2 years ago

@actalink/rn-social-login v0.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

Integration

Initialization

To initialize with Magic Link, make sure you have your API Key. You can create your free account here and get the API Key.

import { ActaSocialSDK, PROVIDER_TYPE } from '@actalink/social'

const acta = new ActaSocialSDK(PROVIDER_TYPE.MAGIC, MAGIC_API_KEY)

Note: If you are using Magic as your social login provider, you need to add it's Relayer to your app as well.

const Relayer = acta.getRelayer!();

return (
      <SafeAreaProvider>
        <Relayer />
        {...}
      </SafeAreaProvider>
)

Login with Email - OTP

We support login with email by OTP. This will return an entity - ActaSigner.

const actaSigner = await acta.login({ email }, LOGIN_TYPE.OTP)

Acta Signer

This is an entity which will be useful when you will use our Smart Wallet and payment functionalities.

const signer = acta.getActaSigner()
const balance = await signer.getBalance()
const address = await signer.getWalletAddress()
const signature = await actaSigner.signMessage(message)