Skip to content
This repository has been archived by the owner on Dec 25, 2023. It is now read-only.

AstarNativeWallet/web3auth-react-native-sdk

 
 

Repository files navigation

React Native SDK for Web3Auth

Installation

npm install @web3auth/react-native-sdk

To allow the SDK to work with exported Expo Android apps, you need to place a designated scheme into app.json, like below:

    "scheme": "web3authreactnativesdkexample",

Usage

Please see App.tsx for detailed example.

import * as WebBrowser from "@toruslabs/react-native-web-browser";
// or  import * as WebBrowser from "expo-web-browser"; (for expo)

const web3auth = new Web3Auth(WebBrowser, {
  clientId: "BC5bANkU4-fil7C5s1uKzRfF0VGqbuaxDQiLnQ8WgF7SEA32lGegAhu7dk4dZf3Rk397blIvfWytXwsRvs9dOaQ",
  network: Network.TESTNET,
});
const state = await web3auth.login({
  loginProvider: LoginProvider.GOOGLE,
  redirectUrl: resolvedRedirectUrl,
});

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 39.4%
  • Java 26.8%
  • C++ 12.5%
  • Objective-C++ 7.6%
  • JavaScript 4.5%
  • Objective-C 4.1%
  • Other 5.1%