@actalink/rn-social-login
v0.0.1
Published
This is a package for react native that provides social login with different social login providers.
Downloads
60
Readme
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)