Skip to content

Conversation

yashovardhan
Copy link
Member

@yashovardhan yashovardhan commented Sep 10, 2025

Update android sdk to v10


Note

Migrates Android docs to SDK v10 with new auth flow (connectTo), renamed enums/methods, SFA and smart accounts support, wallet UI updates, and sidebar/version changes.

  • Android SDK v10 Upgrade:
    • Update dependency to web3auth-android-sdk:10.0.0; bump displayed Android PnP version to 10.0.x.
    • Add full migration guide sdk/android/migration-guides/android-v9-to-v10.mdx.
  • API Renames/Breaking Changes:
    • Auth: login()connectTo(); Provider/TypeOfLoginAuthConnection; LoginConfigItemAuthConnectionConfig; loginConfigauthConnectionConfig.
    • Network/URL: networkweb3AuthNetwork (use Web3AuthNetwork); redirectUrl now String.
    • Keys: getPrivKey/getEd25519PrivKeygetPrivateKey/getEd25519PrivateKey.
    • Wallet Services: launchWalletServices()showWalletUI(); request() no longer needs ChainConfig and adds smart account methods.
  • New/Enhanced Features:
    • Single Factor Auth (SFA) via idToken in LoginParams.
    • Smart accounts and gas sponsorship integrated into Wallet Services.
    • Expanded Web3AuthOptions (chains, defaultChainId, walletServicesConfig, enableLogging, useSFAKey).
  • Docs & Samples Overhaul:
    • Revise getting started, advanced config, custom auth, MFA, dApp share, and tutorial to new APIs and enums.
    • Add new usage pages: usage/connectTo, usage/getPrivateKey, usage/showWalletUI; remove legacy login, getPrivKey, launchWalletServices pages.
    • Update dApp Share response fields (verifier*authConnection*, verifierIduserId).
  • Navigation/Sidebar:
    • Update ew-sidebar.js to reflect new usage pages and add sdk/android/advanced/smart-accounts entry.

Written by Cursor Bugbot for commit ba28ca9. This will update automatically on new commits. Configure here.

@yashovardhan yashovardhan requested review from a team as code owners September 10, 2025 19:27
Copy link

vercel bot commented Sep 10, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
metamask-docs Error Error Oct 1, 2025 6:46am

alexandratran
alexandratran previously approved these changes Sep 19, 2025
Comment on lines 396 to 403
- [ ] Dependencies updated to v10.x
- [ ] Imports updated with new package references
- [ ] `Web3AuthOptions` configuration updated
- [ ] `login()` calls replaced with `connectTo()`
- [ ] Private key method names updated
- [ ] Wallet services methods updated
- [ ] Dashboard chain configuration verified
- [ ] Testing completed for all authentication flows
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

After instantiating Web3Auth, the next step is to initialize it using the `initialize` method. This method is essential for setting up the SDK, checking for any active sessions, and fetching the whitelabel configuration from your dashboard.

Once the `initialize` method executes successfully, you can use the `getPrivKey` or `getEd25519PrivKey` methods to verify if an active session exists. If there is no active session, these methods will return an empty string; otherwise, they will return the respective private key.
Once the `initialize` method executes successfully, you can use the `getPrivateKey` or `getEd25519PrivateKey` methods to verify if an active session exists. If there is no active session, these methods will return an empty string; otherwise, they will return the respective private key.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is changed, the initialize method will throw an error that needs to be swallowed if the session is not present.

initialize method can fail if the session is not present, or if there is an network issue to get the dashboard configuration, or session validation.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added extra context

Comment on lines +54 to +55
| `web3AuthNetwork` | Defines the Web3Auth Network. It's a mandatory field of type `Web3AuthNetwork`. |
| `redirectUrl` | URL that Web3Auth will redirect API responses upon successful authentication from browser. It's a mandatory field of type `String`. |
Copy link
Member

@AyushBherwani1998 AyushBherwani1998 Sep 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are lot of new parameters added. Top of my head, missing default chain id, account abstraction config.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

var buildEnv: BuildEnv? = BuildEnv.PRODUCTION,
@Transient var redirectUrl: Uri,
var sdkUrl: String = getSdkUrl(buildEnv),
val web3AuthNetwork: Web3AuthNetwork,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing few, can't see account abstraction config.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

| `ui_locales?` | The space separated list of language tags, ordered by preference. For instance `fr-CA fr en`. |
| `id_token_hint?` | It denotes the previously issued ID token. It takes `String` as a value. |
| `id_token?` | JWT (ID Token) to be passed for login. |
| `login_hint?` | Used to specify the user's email address or phone number for Email/SMS Passwordless login flows. Takes a `String` value. For the SMS, the format should be: `+{country_code}-{phone_number}` (e.g. `+1-1234567890`) |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think, now we have LoginParams.loginHint which we use for email/sms passwordless, instead of using extra login options.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

import TabItem from '@theme/TabItem'
import Tabs from '@theme/Tabs'

The `showWalletUI` method launches a WebView which allows you to use the templated wallet UI services. The method automatically uses the chain configuration from your project settings and no longer requires manual `ChainConfig` parameter. Wallet Services is currently only available for EVM chains.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing AccountAbstraction information.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

Comment on lines +19 to +25
| `appState?` | It can be used to keep track of the app state. Default is `null`, and accepts `String` as a value. |

:::warning

The chain configuration is now automatically retrieved from your project settings in the Web3Auth Dashboard. The request will use the appropriate chain based on your project configuration.

:::
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing account abstraction feature via request to sign user operation.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

// ...
// focus-next-line
implementation 'com.github.web3auth:web3auth-android-sdk:7.4.0'
implementation 'com.github.web3auth:web3auth-android-sdk:10.0.0'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Page needs revamp, the tutorial is outdated. Lot of breaking changes from 7.4.0, to 10.0.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Copy link
Member

@AyushBherwani1998 AyushBherwani1998 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left few comments, also missing account abstraction page.

cursor[bot]

This comment was marked as outdated.


// focus-next-line
factory<EthereumUseCase> { EthereumUseCaseImpl(Web3j.build(HttpService(chainConfigList.first().rpcTarget))) }
factory<EthereumUseCase> { EthereumUseCaseImpl(Web3j.build(HttpService(chainsList.first().rpcTarget))) }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Variable Reference Error and Naming Confusion

The chainsList variable is referenced at line 454 before its definition at line 466, which would cause a reference error. This also means the tutorial's code snippets are out of order. Additionally, some comments and text still refer to the old chainConfigList name, which could be confusing.

Additional Locations (1)

Fix in Cursor Fix in Web

Comment on lines +96 to +98
// Returns the Ed25519 private key for Solana and other chains.
override fun getEd25519PrivateKey(): String {
return web3Auth.getEd25519PrivateKey()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tutorial is about EVM, we don't need this.

Comment on lines +123 to +130
// Shows the Wallet UI with smart account support
override suspend fun showWalletUI(): CompletableFuture<Void> {
return web3Auth.showWalletUI()
}

// Makes a blockchain request
override suspend fun request(method: String, params: JsonArray): CompletableFuture<SignResponse> {
return web3Auth.request(method, params)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you updated the UI, and example to match this? This was not added.

Comment on lines +1105 to +1121
## Advanced Features

### Smart Accounts (ERC-4337)

Web3Auth Android SDK v10.x includes built-in support for smart accounts. When enabled in your dashboard, users automatically get smart contract wallets with advanced features:

```kotlin
// Check if smart accounts are enabled
val userInfo = web3AuthHelper.getUserInfo()
if (userInfo.isSmartAccountEnabled) {
val smartAccountAddress = userInfo.smartAccountAddress
Log.d("Smart Account", "Address: $smartAccountAddress")

// Use smart account for gasless transactions
val userOp = buildUserOperation(smartAccountAddress, transaction)
web3AuthHelper.request("eth_sendUserOperation", userOp)
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This whole section is not correct, and using Web3Auth Wallet Services as well. Please check the example, also there's no function/method such as buildUserOperation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants