In this guide you will learn how to enable Web3 user onboarding in your dApp via passwordless authentication.
- Make sure you can access Arcana Developer Dashboard:
- Install the
@arcana/authpackage. For details, see Arcana Auth Quick Start Guide.
At a high level, you need to perform these two steps for enabling passwordless authentication in your dApp:
Step 1: Choose Login Type: Passwordless
Go to the Arcana Dashboard:
If this is your first visit to the dashboard, create a new entry for your dApp to register it.
Once the dApp is registerd using the dashboard, Arcana Network assigns an appID for every dApp.
You need to save this App ID.
After completing the dApp configuration at the dashboard, you will be required to specify this appID while integrating your dApp code with the Arcana Auth SDK.
Click on the
Authtab. Refer to the
You can enable more than one authentication mechanism for dApp end users. In addition to passwordless login, you can also allow dApp users to onboard using other supported authentication mechanisms.
Redirect URI - Specify the URL where users of this dApp will be redirected to, once a user clicks on the verification link received from Arcana via email. URL fragments, relative paths, wildcards, and public IP addresses are not supported.
You can use defaults for other dApp settings or choose to modify them as per your dApp use case. See how to configure your dApp guide for details.
You can revisit Arcana Dashboard later and reference the appID displayed on the top right of the dashboard. You can also view and modify configuration settings for your dApp later.
Not all configuration settings can be changed once selected.
For example, once you choose the
regionwhere dApp user data is stored in Arcana Store, you cannot change it later.
Also, if you enable the
Wallet UIdisplay mode, you cannot turn it off due to security considerations.
Step 2: Integrate with Arcana Auth SDK
Use instructions here to integrate with Arcana Auth SDK
Next, trigger passwordless login by calling
loginWithLinkfunction. Specify the email ID provided by the dApp user as the input:
Check if the user has logged in successfully:
//Check is logged in
const loggedIn = await wallet.isLoggedIn()
//Use other Auth SDK functions or integrate with Storage SDK
Log out the dApp user when requested:
That is all! 🎉
Your dApp is all set for onboarding users via passwordless login mechanism.
After enabling passwordless login in your dApp, you can also use the Auth SDK for encrypting or decrypting data user data.
You can further integrate with Arcana Storage SDK if your application needs to store, retrieve or share file data. All file store and access operations require file owners to sign blockchain transactions using the ethereum provider exposed by Arcana Auth SDK.