Build Passwordless Auth
In this guide, you will learn how a 'Vanilla HTML/CSS/JS' app integrates with the Arcana Auth SDK can easily onboard users via custom login UI that enables passwordless login.
Prerequisites
- Make sure you can access the Arcana Developer Dashboard: https://dashboard.arcana.network
- The app must be registered using the Arcana Developer Dashboard and a unique Client ID must be already assigned to it. This Client ID is essential for integrating the app with the Arcana Auth SDK
- Follow the instructions as per the app type and integrate the app with the Arcana Auth SDK.
Configuring App
Unlike other user onboarding options that require enabling authentication providers, passwordless login can be enabled without any configuration setup using the Arcana Developer Dashboard.
Developers can optionally choose to modify the default settings for branding and the Arcana wallet settings in the Arcana Developer Dashboard.
Steps
Enabling passwordless login in a Web3 app that is integrated with the Arcana Auth SDK is simple!
Make sure that all the prerequisites listed above are met. The app should be successfully registered, configured, and integrated with the Arcana Auth SDK, before adding code to onboard users via the passwordless login option.
Step 1: Call User Onboarding Function: loginWithLink
After integrating the app, add the code to use loginWithLink
function of the Arcana Auth SDK and trigger passwordless login to onboard the users. App users are required to supply an email ID as input for passwordless login.
await wallet.loginWithLink(`${email}`)
Check if the user has logged in successfully:
const connected = await auth.isLoggedIn()
Log out the dApp user when requested:
await auth.logout()
That is all!
Your dApp is all set for onboarding users via the passwordless login option.
What's Next?
After enabling passwordless login in the app, developers can use other Arcana Auth SDK functions and enable Web3 wallet operations for authenticated users. See Arcana Auth SDK Usage Guide, how to enable the Arcana wallet for details.
See also
- Arcana authentication concepts.
- Configure Social Providers
- Arcana Auth SDK Errors
- Arcana Auth SDK Usage Guide
- Arcana Auth SDK Reference Guide