Solana App: Onboard Users
Estimated time to read: 4 minutes
Learn how to onboard users through the configured social login providers in a 'Solana' app.
Prerequisites
-
Register the 'Solana' app and configure SDK usage settings for social login providers, manage Solana chains and wallet user experience.
-
Install the required SDK packages for 'Solana'.
-
Integrate 'Solana' app and create
AuthProvider
,ArcanaConnector
as per the app type.
Non-EVM Chains
When registering an app through Arcana Developer Dashboard, the choice of chain type (EVM, Solana, MultiversX, Near) is final. App developers can't change it later. They can switch the default chain within the same type. For example, a Solana app on Testnet can switch to Solana Mainnet or Solana Dev but not to MultiversX or an EVM chain.
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 for Solana in the authenticated user's context.
See also
'Solana' integration example: See sample-auth-solana
submodule in Auth Examples