0.0.1 • Published 12 months ago

@arcana/auth-web3-react v0.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
12 months ago

Arcana auth Web3 react connector

Arcana auth connector for web3-react

Install

yarn add @arcana/auth-web3-react @arcana/auth

Usage

With connect modal

import { ArcanaConnector } from "@arcana/auth-web3-react"
import { AuthProvider } from "@arcana/auth"
import { initializeConnector } from "@web3-react/core"


const auth = new AuthProvider(`${arcana_client_id}`) // Singleton


export const [authConnect, hooks] = initializeConnector(
  (actions) =>
    new ArcanaConnector(auth, {
      actions,
    })
)

With custom UI

import { ArcanaConnector } from "@arcana/auth-web3-react"
import { AuthProvider } from "@arcana/auth"
import { initializeConnector } from "@web3-react/core"


const auth = new AuthProvider(`${arcana_client_id}`) // Singleton


export const [authConnect, hooks] = initializeConnector(
  (actions) =>
    new ArcanaConnector(auth, {
      actions,
      login: {
        provider: 'passwordless',
        email: 'abc@example.com'
      } // either add here or in setLogin function
    })
)

// OR

authConnect.setLogin({ provider: "google" })
0.0.1

12 months ago

0.0.1-beta.3

12 months ago

0.0.1-beta.2

12 months ago

0.0.1-beta.1

1 year ago