Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Java/Kotlin seamless logins

NotificationsYou must be signed in to change notification settings

Web3Auth/web3auth-android-sdk

Repository files navigation

SDK Version

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.

📖 Documentation

Checkout the officialWeb3Auth Documentation andSDK Reference to get started!

💡 Features

  • Plug and Play, OAuth based Web3 Authentication Service
  • Fully decentralized, non-custodial key infrastructure
  • End to end Whitelabelable solution
  • Threshold Cryptography based Key Reconstruction
  • Multi Factor Authentication Setup & Recovery (Includes password, backup phrase, device factor editing/deletion etc)
  • Support for WebAuthn & Passwordless Login
  • Support for connecting to multiple wallets
  • DApp Active Session Management

...and a lot more

⏪ Requirements

  • Android API version 24 or newer is required.
  • compileSdkVersion needs to be 34

⚡ Installation

In your project-levelsettings.gradle file, add JitPack repository:

dependencyResolutionManagement {     repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)     repositories {         google()         mavenCentral()         maven { url"https://jitpack.io" }// <-- Add this line     }}

Then, in your app-levelbuild.gradle dependencies section, add the following:

dependencies {// ...    implementation'com.github.web3auth:web3auth-android-sdk:9.0.0'}

🌟 Configuration

CheckoutSDK Reference to configure for Android.

💥 Getting Started

importcom.web3auth.core.Web3Authimportcom.web3auth.core.types.Web3AuthOptionsclassMainActivity :AppCompatActivity() {// ...privatelateinitvar web3Auth:Web3AuthoverridefunonCreate(savedInstanceState:Bundle?) {super.onCreate(savedInstanceState)        setContentView(R.layout.activity_main)        web3Auth=Web3Auth(Web3AuthOptions(                context=this,                clientId="YOUR_WEB3AUTH_CLIENT_ID",// Pass over your Web3Auth Client ID from Developer Dashboard                network=Network.MAINNET,                redirectUrl=Uri.parse("{YOUR_APP_PACKAGE_NAME}://auth"),            )        )// Handle user signing in when app is not alive        web3Auth.setResultUrl(intent?.data)    }overridefunonResume() {super.onResume()if (Web3Auth.getCustomTabsClosed()) {Toast.makeText(this,"User closed the browser.",Toast.LENGTH_SHORT).show()            web3Auth.setResultUrl(null)Web3Auth.setCustomTabsClosed(false)        }    }overridefunonNewIntent(intent:Intent?) {super.onNewIntent(intent)// Handle user signing in when app is active        web3Auth.setResultUrl(intent?.data)// ...    }privatefunonClickLogin() {val selectedLoginProvider=Provider.GOOGLE// Can be Google, Facebook, Twitch etcval loginCompletableFuture:CompletableFuture<Web3AuthResponse>= web3Auth.login(LoginParams(selectedLoginProvider))                loginCompletableFuture.whenComplete { _, error->if (error==null) {// render logged in UI            }else {// render login error UI            }        }    }//...}

🩹 Examples

Checkout the examples for your preferred blockchain and platform in ourexamples

🌐 Demo

Checkout theWeb3Auth Demo to see how Web3Auth can be used in an application.

Have a look at ourWeb3Auth PnP Android Quick Start to help you quickly integrate a basic instance of Web3Auth Plug and Play in your Android app.

Further checkout theapp folder within this repository, which contains a sample app.

💬 Troubleshooting and Support

  • Have a look at ourCommunity Portal 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.
  • Checkout ourTroubleshooting Documentation Page to know the common issues and solutions.
  • For Priority Support, please have a look at ourPricing Page for the plan that suits your needs.

About

Java/Kotlin seamless logins

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors15

Languages


[8]ページ先頭

©2009-2025 Movatter.jp