Skip to content

Plug and Play Auth

In this tutorial, you will learn how dApps can integrate with the Arcana Auth SDK and use the 'plug and play'' authentication feature.

The Auth SDK's plug and play authentication simplifies and speeds up addition of user onboarding functionality in a Web3 application. The developer can configure the user onboarding options on this plug and play UI screen using the Arcana Dashboard.

Prerequisites

Configure Social Logins

During dApp configuration, make sure you follow the steps 1-3 listed for each of the supported social logins and configure the Auth settings in the dashboard. For details, refer to the social logins configuration guide.

Only the configured providers will show up in the plug and play pop up screen as the available onboarding options. If no providers are configured, only the passwordless login option is enabled by default.

Steps

Using plug-and-play authentication feature is simple!

Just a single line of code!

Ensure that you have successfully integrated with the Auth SDK, as listed in the prerequisites section and initialized the AuthProvider. After integrating your dApp with the Auth SDK, simply use the connect method to plug built-in user authentication in your application:

await auth.connect();

This will bring up the plug-and-play pop-up modal on the dApp window and display the available options for user onboarding. Only those options are displayed that are configured by the dApp developer using the Arcana Developer Dashboard.

The figure below shows the plug-and-play pop-up authentication screen for Arcana wallet for a sample dApp that allowed only Google social authentication and passwordless login.

That is all!

You have successfully enabled plug-and-play authentication feature to onboard the dApp users.

What's Next?

Besides onboarding the dApp users via plug and play authentication, the Auth SDK can be utilized for enabling Arcana wallet to sign blockchain transactions.

Once the Auth SDK is integrated with a dApp, authenticated users can access the Arcana wallet for signing blockchain transactions on any EVM-compatible network.

See also


Last update: January 11, 2023 by shaloo