{"id":20747721,"url":"https://github.com/web3auth/single-factor-auth-react-native","last_synced_at":"2025-05-11T05:32:55.841Z","repository":{"id":195748200,"uuid":"598502005","full_name":"Web3Auth/single-factor-auth-react-native","owner":"Web3Auth","description":null,"archived":true,"fork":false,"pushed_at":"2024-10-01T14:50:05.000Z","size":7648,"stargazers_count":1,"open_issues_count":17,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-22T23:11:27.588Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Web3Auth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-07T08:41:07.000Z","updated_at":"2024-10-29T08:23:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"20555ce6-5850-4ab0-b7c7-b4a0249a4dfc","html_url":"https://github.com/Web3Auth/single-factor-auth-react-native","commit_stats":null,"previous_names":["web3auth/single-factor-auth-react-native"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Web3Auth%2Fsingle-factor-auth-react-native","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Web3Auth%2Fsingle-factor-auth-react-native/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Web3Auth%2Fsingle-factor-auth-react-native/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Web3Auth%2Fsingle-factor-auth-react-native/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Web3Auth","download_url":"https://codeload.github.com/Web3Auth/single-factor-auth-react-native/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253523696,"owners_count":21921815,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-17T08:14:12.769Z","updated_at":"2025-05-11T05:32:55.497Z","avatar_url":"https://github.com/Web3Auth.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Web3Auth Single Factor Auth React Native SDK\n\nWeb3Auth is where passwordless auth meets non-custodial key infrastructure for Web3 apps and wallets. By aggregating OAuth (Google, Twitter, Discord) logins, different wallets and innovative Multi Party Computation (MPC) - Web3Auth provides a seamless login experience to every user on your application.\n\nWeb3Auth Single Factor Auth is the SDK that gives you the ability to start with just one key (aka, Single Factor) with Web3Auth, giving you the flexibility of implementing your own UI and UX.\n\n## 📖 Documentation\n\nCheckout the official [Web3Auth Documentation](https://web3auth.io/docs) and [SDK Reference](https://web3auth.io/docs/sdk/core-kit/sfa-react-native/) to get started!\n\n## 💡 Features\n\n- JWT based Web3 Authentication Service\n- Fully decentralized, non-custodial key infrastructure\n- End to end Whitelabelable solution\n- Threshold Cryptography based Key Reconstruction\n- Multi Factor Authentication Setup \u0026 Recovery (Includes password, backup phrase, device factor editing/deletion etc)\n- Support for WebAuthn \u0026 Passwordless Login\n- Support for connecting to multiple wallets\n- DApp Active Session Management\n- Support for Expo and Bare React Native Workflows\n\n...and a lot more\n\n## ⏪ Requirements\n\n- For iOS, only iOS 12+ supported since we requires ASWebAuthenticationSession.\n\n- For Android, Custom Tab support is required.\n\n## ⚡ Installation\n\n```sh\nnpm install @web3auth/single-factor-auth-react-native\n```\n\n## 🌟 Configuration\n\n### Configure your Web3Auth project\n\nHop on to the [Web3Auth Dashboard](https://dashboard.web3auth.io/) and create a new project. Use the Client ID of the project to start your integration.\n\n![Web3Auth Dashboard](https://web3auth.io/docs/assets/images/project_plug_n_play-89c39ec42ad993107bb2485b1ce64b89.png)\n\n- Add `{YOUR_APP_PACKAGE_NAME}://auth` to **Whitelist URLs**.\n\n- Copy the Project ID for usage later.\n\n## 💥 Initialization \u0026 Usage\n\nIn your sign-in activity', create an `Web3Auth` instance with your Web3Auth project's configurations and\nconfigure it like this:\n\n```js\nimport EncryptedStorage from 'react-native-encrypted-storage';\nimport Web3Auth from '@web3auth/single-factor-auth-react-native';\nimport {EthereumPrivateKeyProvider} from '@web3auth/ethereum-provider';\n\nexport default function App() {\n  const [web3auth, setWeb3Auth] = useState\u003cWeb3Auth | null\u003e(null);\n  const [privateKey, setPrivateKey] = useState\u003cstring | null\u003e();\n\n  useEffect(() =\u003e {\n    async function init() {\n        const authProvider = new Web3Auth(EncryptedStorage, {\n          clientId: 'YOUR_WEB3AUTH_CLIENT_ID', // Get your Client ID from Web3Auth Dashboard\n          web3AuthNetwork: 'cyan',\n          usePnPKey: false, // By default, this sdk returns CoreKitKey\n        });\n\n        const privateKeyProvider = new EthereumPrivateKeyProvider({\n          config: {\n            /*\n              pass the chain config that you want to connect with\n              all chainConfig fields are required.\n              */\n            chainConfig: {\n              chainId: '0x1',\n              rpcTarget: 'https://rpc.ankr.com/eth',\n              displayName: 'mainnet',\n              blockExplorer: 'https://etherscan.io/',\n              ticker: 'ETH',\n              tickerName: 'Ethereum',\n            },\n          },\n        });\n        setWeb3Auth(authProvider);\n        await authProvider.init(privateKeyProvider);\n\n        if (authProvider.connected) {\n          const finalPrivateKey = await authProvider.provider!.request({\n            method: 'eth_private_key',\n          });\n\n          setPrivateKey(finalPrivateKey as string);\n          console.log('Private Key: ' + finalPrivateKey);\n        }\n    }\n    init();\n  }, []);\n\n  const login = async () =\u003e {\n    const loginRes = await signIn();\n    const idToken = await loginRes!.user.getIdToken(true);\n    const parsedToken = parseToken(idToken);\n\n    const verifier = 'YOUR_WEB3AUTH_VERIFIER';\n    const verifierId = parsedToken.sub;\n    const provider = await web3auth!.connect({\n      verifier, // e.g. `web3auth-sfa-verifier` replace with your verifier name, and it has to be on the same network passed in init().\n      verifierId, // e.g. `Yux1873xnibdui` or `name@email.com` replace with your verifier id(sub or email)'s value.\n      idToken,\n    });\n    const finalPrivateKey = await provider!.request({\n      method: 'eth_private_key',\n    });\n\n    setPrivateKey(finalPrivateKey as string);\n    console.log('Private Key: ' + finalPrivateKey);\n  };\n}\n```\n\n## 🩹 Examples\n\nCheckout the examples for your preferred blockchain and platform in our [examples](https://web3auth.io/docs/examples)\n\n## 🌐 Demo\n\nCheckout the [Web3Auth Demo](https://demo-app.web3auth.io/) to see how Web3Auth can be used in an application.\n\nFurther checkout the [example folder](https://github.com/Web3Auth/single-factor-auth-react-native/tree/main/demo/sfarndemo) within this repository, which contains a sample app.\n\n## 💬 Troubleshooting and Support\n\n- Have a look at our [Community Portal](https://community.web3auth.io/) to see if anyone has any questions or issues you might be having. Feel free to reate new topics and we'll help you out as soon as possible.\n- Checkout our [Troubleshooting Documentation Page](https://web3auth.io/docs/troubleshooting) to know the common issues and solutions.\n- For Priority Support, please have a look at our [Pricing Page](https://web3auth.io/pricing.html) for the plan that suits your needs.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweb3auth%2Fsingle-factor-auth-react-native","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweb3auth%2Fsingle-factor-auth-react-native","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweb3auth%2Fsingle-factor-auth-react-native/lists"}