{"id":20747711,"url":"https://github.com/web3auth/single-factor-auth-android","last_synced_at":"2025-04-28T12:03:20.330Z","repository":{"id":173548862,"uuid":"637747155","full_name":"Web3Auth/single-factor-auth-android","owner":"Web3Auth","description":"Single-Factor-Auth-Android","archived":false,"fork":false,"pushed_at":"2025-04-07T05:05:05.000Z","size":1004,"stargazers_count":3,"open_issues_count":0,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-28T12:03:13.234Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"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":null,"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-05-08T10:23:11.000Z","updated_at":"2025-04-07T04:50:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"9100945f-dc1a-4c26-a441-36036268dfda","html_url":"https://github.com/Web3Auth/single-factor-auth-android","commit_stats":null,"previous_names":["web3auth/single-factor-auth-android"],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Web3Auth%2Fsingle-factor-auth-android","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Web3Auth%2Fsingle-factor-auth-android/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Web3Auth%2Fsingle-factor-auth-android/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Web3Auth%2Fsingle-factor-auth-android/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Web3Auth","download_url":"https://codeload.github.com/Web3Auth/single-factor-auth-android/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251311333,"owners_count":21569009,"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:11.070Z","updated_at":"2025-04-28T12:03:20.307Z","avatar_url":"https://github.com/Web3Auth.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Single-Factor-Auth-Android\n\n[![](https://jitpack.io/v/com.github.web3auth/single-factor-auth-android.svg)](https://jitpack.io/#com.github.web3auth/single-factor-auth-android)\n\n\u003e Web3Auth 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/sdk/web/core/) to get started.\n\n\n## Features\n- Multi network support\n- All API's return `CompletableFutures`\n\n\n## Getting Started\n\nTypically your application should depend on release versions of fetch-node-details, but you may also use snapshot dependencies for early access to features and fixes, refer to the Snapshot Dependencies section.\nThis project uses [jitpack](https://jitpack.io/docs/) for release management\n\nAdd the relevant dependency to your project:\n\n```groovy\nrepositories {\n        maven { url \"https://jitpack.io\" }\n   }\ndependencies {\n    implementation 'com.github.Web3auth:single-factor-auth-android:0.0.4'\n}\n```\n\n### Permissions\n\nOpen your app's `AndroidManifest.xml` file and add the following permission:\n\n```xml\n\u003cuses-permission android:name=\"android.permission.INTERNET\" /\u003e\n```\n\n## Requirements\n- Android API version 24 or newer is required.\n\n## 💥 Initialization \u0026 Usage\n\nIn your activity class, configure it like this:\n\n```kotlin\nclass MainActivity : AppCompatActivity() {\n    // ...\n    private lateinit var singleFactorAuth: SingleFactorAuth\n    private lateinit var singleFactorAuthArgs: SingleFactorAuthArgs\n    private lateinit var loginParams: LoginParams\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        setContentView(R.layout.activity_main)\n\n        // Initialize singleFactorAuthArgs with TorusNetwork type \n        singleFactorAuthArgs = SingleFactorAuthArgs(TorusNetwork.TESTNET)\n        \n        // Initialize singleFactorAuth by passing singleFactorAuthArgs params\n        singleFactorAuth = SingleFactorAuth(singleFactorAuthArgs)\n\n        // Initialize loginParams by passing verifier, verifiedId(email) and idToken\n        loginParams = LoginParams(TEST_VERIFIER, TORUS_TEST_EMAIL, idToken)\n\n        // Use the getKey function to get the privateKey and public address for the user\n        val torusKey: TorusKey = singleFactorAuth.getKey(loginParams, this.applicationContext).get()\n        print(\"Private Key: ${torusKey.privateKey}\")\n\n        // Call initialize function to get TorusKey value without relogging in user if a user has an active session it will return the TorusKey\n        val sessionResponse: CompletableFuture\u003cTorusKey\u003e = singleFactorAuth.initialize(this.applicationContext)\n        sessionResponse.whenComplete { torusKey, error -\u003e\n            if (error == null) {\n                print(\"Private Key: ${torusKey.privateKey}\")\n                print(\"Public Address: ${torusKey.publicAddress}\")\n            }\n        }\n        \n        // ...\n    }\n    \n    //...\n}\n```\n\n## 🩹 Examples\n\nCheckout the examples for your preferred blockchain and platform in our [examples repository](https://github.com/Web3Auth/single-fact-auth-android/tree/master/app)\n\n\n## 💬 Troubleshooting and Discussions\n\n- Have a look at our [GitHub Discussions](https://github.com/Web3Auth/Web3Auth/discussions?discussions_q=sort%3Atop) to see if anyone has any questions or issues you might be having.\n- Checkout our [Troubleshooting Documentation Page](https://web3auth.io/docs/troubleshooting) to know the common issues and solutions\n- Join our [Discord](https://discord.gg/web3auth) to join our community and get private integration support or help with your integration.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweb3auth%2Fsingle-factor-auth-android","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweb3auth%2Fsingle-factor-auth-android","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweb3auth%2Fsingle-factor-auth-android/lists"}