Gasless App: Onboard Users
Estimated time to read: 4 minutes
Learn how to onboard users in a Web3 app that is configured for using gasless transactions.
Prerequisites
-
Register the 'Gasless' app and configure SDK usage settings for social login providers, manage app manage app chains and wallet user experience.
-
Configure gasless, set up gas tanks and deposit funds for gasless transactions.
-
Integrate the app and create
AuthProvider
,ArcanaConnector
as per the app type.
Gasless via Third-party Wallets
The Arcana Auth SDK has a built-in gasless feature to allow gasless transactions via the in-app Arcana wallet.
To enable gasless transactions in third-party wallets, install and integrate with the Arcana Gasless (Standalone) SDK.
Onboard Users
User Onboarding Considerations
-
Log in Options: What options are offered by the app to the onboard users via social login? Configure the required social login providers via the dashboard.
-
Built-in or Custom Login UI: Does the Web3 app have a custom login UI or do they need to use the built-in, plug-and-play login UI modal offered by the Arcana Auth SDK? Choose the appropriate onboarding functions of the
AuthProvider
. -
Session Management: Does the authenticated user stay logged in if they accidentally close the browser tab? If yes, what is the acceptable Web3 app security window for the session? After how long should the session expire and a user re-login is necessitated for security? Configure the session management settings via the dashboard.
-
Reconnect: Does the Web3 app allow users to stay connected or require re-authentication after a certain time has elapsed? Use
isConnected
,canReconnect
andreconnect
functions of theAuthProvider
.
Advanced
Arcana JWT Token
Upon successful authentication, Arcana Auth SDK returns a unique JWT token to the app called the Arcana JWT Token. App developers can access this token via getUser()
method and refer to the loginToken
field of the UserInfo
object.
Developers can use this token to verify the user and subsequently generate another token for app use if required.
In the future, the Arcana JWT Token will be deprecated. Use userDIDToken
to verify user.
Upon successful authentication, Arcana Auth SDK returns a unique DID token to the app called the Arcana DID Token. App developers can access this token via getUser()
method and refer to the userDIDToken
field of the UserInfo
object.
Developers can use this token to verify the user and subsequently generate another token for app use.
Global vs. App Specific Keys
Apps using app-specific keys must use a custom login UI that allows users to input the OTP. In this case, the isCompleteRequired
boolean returns true
after initiating login with OTP.
Apps using global keys are not required to use a custom login UI. A built-in login UI is automatically displayed for the user for OTP. Users must enter the OTP received via email in this UI.
MFA Enabled / Disabled
During passwordless login via OTP, apps configured for MFA and those using overlays must hide it to enable OTP input. Use the isMFARequired
callback in the loginWithOTPComplete
method to hide the overlay.
Reconnect Users
Use canReconnect
and reconnect
methods of AuthProvider
within a 30-min window of the user-logout action. Allow users to automatically reconnect to the app without re-authentication.
See canReconnect
and reconnect
for details.
Apps Using Custom Auth
Web3 apps that use custom user authentication solutions and require authenticated users to sign blockchain transactions can also integrate with the Arcana Auth SDK. These apps can skip the social onboarding feature and use loginWithCustomProvider
function of the AuthProvider
to assign keys securely. Learn more...
What's Next?
Use the EIP-1193 provider offered by the SDK to call JSON/RPC functions and other supported Web3 wallet operations in the authenticated user's context.
Non-EVM Chains
Note that the JSON/RPC functions and Web3 wallet operations supported by the AuthProvider
may vary across EVM chains and other chains such as Solana, MultiversX, Near, etc.
See also
'Gasless' integration example: See sample-gasless-arcana-only
submodule in Auth Examples