EcosystemWallet.Create
Create an instance of EcosystemWallet
using a user's email, phone number or OAuth. This wallet type facilitates secure user authentication through OTP verification, making it suitable for client-facing applications where handling private keys directly is not ideal.
Login Methods
Ecosystem Wallets support a variety of login methods:
- Email (OTP Login)
- Phone (OTP Login)
- Socials (Google, Apple, Facebook, Telegram, Farcaster, Line etc.)
- SIWE (Sign-In with Ethereum)
- Custom Auth (OIDC Compatible)
- Custom Auth (Generic Auth Endpoint)
- Guest (Onboard easily, link other accounts later)
Usage
OTP Authentication Flow
The OTP authentication flow involves sending an OTP to the user's email or phone and then verifying the OTP to complete authentication:
Send OTP: Initiate the login process by calling SendOTP on the EcosystemWallet instance. This sends an OTP to the user's email or phone number.
Submit OTP: Once the user receives the OTP, they submit it back to the application, which then calls LoginWithOtp on the EcosystemWallet instance to verify the OTP and complete the login process.
Example
Here's an example of creating an EcosystemWallet
with a user's email and completing the OTP authentication flow:
Note: EcosystemWallet leverages the security of OTP-based authentication to ensure a secure and user-friendly experience in blockchain applications.
OAuth Authentication Flow
LoginWithOauth: Initiate the login process by calling LoginWithOauth on the EcosystemWallet instance. This redirects the user to the OAuth provider's login page.
Example
Here's an example of creating an EcosystemWallet
using OAuth.
Note: The LoginWithOauth
API allows for custom browser handling, making it suitable for various application types and platforms.
Unified Identity - Account Linking
EcosystemWallet supports linking multiple authentication methods to a single user account. This feature enables users to access their account using different authentication methods, such as email, phone, or OAuth, without creating separate accounts for each method.