MetaMask Embedded Wallets (formerly Web3Auth) lets you add non-custodial social login wallets to your app. Users sign in with Google, Apple, Auth0, Firebase, or any OAuth provider and get a deterministic, self-custodied private key — no seed phrases, no extension required.
This repository contains iOS (Swift/SwiftUI) examples covering social login, custom authentication, and blockchain integrations.
| Example | Description |
|---|---|
| Quick Start | Basic social login (Google, Apple, etc.) + EVM wallet on Ethereum |
| Grouped Connection (Aggregate Verifier) | Multiple OAuth providers sharing one wallet address |
| Auth0 Custom Connection | Custom JWT authentication via Auth0 |
| Firebase Custom Connection | Custom JWT authentication via Firebase, with Wallet Services and MFA |
| Example | Description |
|---|---|
| Solana | Solana wallet creation, SOL transfers, SPL token interactions |
| Aptos | Aptos wallet creation and Move module interactions |
| Example | Description |
|---|---|
| Playground | Full-featured sandbox: all login providers, MFA, Wallet Services, chain switching |
Note: The
sfa-ios-*examples used the deprecated Single Factor Auth (SFA/CoreKit) SDK and are no longer maintained. Use the PnP iOS SDK examples above instead.
- Get a Client ID — Create a project at dashboard.web3auth.io and copy the Client ID.
- Allowlist your bundle identifier — In the dashboard, add your app's bundle ID under the iOS allowlist.
- Configure a URL scheme — Add a custom URL scheme in your
Info.plist(e.g.com.your.app://auth) to handle OAuth redirects. Use the same value forredirectUrlin yourW3AInitParams. - Clone and open — Each example has its own README with step-by-step setup instructions.
git clone https://github.com/Web3Auth/web3auth-ios-examples.git
cd web3auth-ios-examples/ios-quick-start
open ios-example.xcodeprojAll examples use Swift Package Manager — no CocoaPods required. Dependencies resolve automatically when you open the project in Xcode.
- No built-in blockchain provider — iOS SDK exports the private key directly. Use it with
web3.swift,solana-swift, or any Swift-native library. - Sapphire Devnet vs. Mainnet — Use
sapphire_devnetfor local development. Switch tosapphire_mainnetfor production. Changing the network changes all user wallet addresses permanently. - Social logins — Default connections (Google, Apple, Discord, etc.) work out of the box. Custom OAuth providers require creating a connection on the dashboard.
- Grouped connections — Link multiple login methods (e.g. Google + GitHub) so the same user always gets the same wallet address.
MIT — see LICENSE for details.