Plug-and-Play Auth
In this guide, you will learn how Web3 apps can integrate with the Arcana Auth SDK and use the plug-and-play feature to onboard users with the built-in login UI.
Prerequisites
-
Make sure you can access the Arcana Developer Dashboard: https://dashboard.arcana.network
-
Use the Arcana Developer Dashboard to register and configure the app. The plug-and-play pop-up UI screen will display only those authentication providers that are configured using the Arcana Developer Dashboard. If no authentication providers are configured in the Arcana Developer Dashboard, then users can only onboard the app via the passwordless login option. See how to configure authentication providers for details.
-
Follow the instructions as per the app type and integrate the app with the Arcana Auth SDK before accessing user onboarding functions of the Arcana Auth SDK.
Steps
Using the plug-and-play authentication feature is simple!
Just a single line of code!
Step 1: Call User Onboarding Function: connect
After successfully integrating the app with the Arcana Auth SDK, make sure the AuthProvider
is successfully initialized. Then simply add a single line of code, call to the connect
function of the Arcana Auth SDK and enable the built-in plug-and-play login UI in the app when a user clicks a button to log in:
await auth.connect();
The connect()
function will bring up the plug-and-play pop-up modal in the app context and display the available options for user onboarding. Only those options are displayed that were earlier configured by the developer using the Arcana Developer Dashboard.
The figure below shows the plug-and-play pop-up authentication screen for a test app where the developer had registered and configured Google as the social provider for authentication. The passwordless login option is enabled by default.
That is all!
The plug-and-play user onboarding feature is successfully enabled in an app integrated with the Arcana Auth SDK.
What's Next?
After enabling the plug-and-play user onboarding feature 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
- Configure authentication providers
- Build custom login UI
- Arcana Auth SDK Errors
- Arcana Auth SDK Usage Guide
- Arcana Auth SDK Reference Guide