openlogin-expo-sdk
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

Torus OpenLogin SDK for Expo

Installation

npm install openlogin-expo-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": "openloginexposdkexampleexpo",

Bare React Native apps

If you want to use this SDK with bare React Native apps, you can take reference to the sample app in https://github.com/torusresearch/openlogin-expo-bare-sample .

Usage

Please see App.tsx for detailed example.

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

License

MIT

Package Sidebar

Install

npm i openlogin-expo-sdk

Weekly Downloads

2

Version

0.0.2

License

MIT

Unpacked Size

12.5 kB

Total Files

23

Last publish

Collaborators

  • michaellee8