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",
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 .
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,
});
MIT