😀One-click Onboarding
One-Click Onboarding with the VitalEarth SDK
Last updated
One-Click Onboarding with the VitalEarth SDK
Last updated
The VitalEarth SDK makes user onboarding a breeze, simplifying the process to a single line of code. With our SDK, you don't need to worry about wallets, networks, or Ether connectors.
Here's how you can achieve one-click onboarding for your users:
Before implementing one-click onboarding, make sure you've completed the installation and initialization of the VitalEarth SDK as described in the previous steps.
To enable one-click onboarding for your users, follow these steps:
Explanation of the code:
Import the authClient
module from the VitalEarth SDK.
Initialize the client
object by creating a new instance of authClient
. You'll need to specify the network ("test" or "main") and your app name. Replace "YourAppName"
with your actual app's name.
Use await client.login();
to trigger the one-click onboarding process. This single line of code will handle the authentication and onboarding for your users, eliminating the need for them to set up wallets or deal with network configurations.
By implementing this code in your application, users can seamlessly join your sustainability-focused platform with just one click, making it easy for them to get started and engage with your eco-conscious features.
With VitalEarth, user onboarding is no longer a barrier to entry. You can now focus on delivering a user-friendly and sustainable experience to your audience.