arcana_auth

Last updated:

0 purchases

arcana_auth Image
arcana_auth Images
Add to Cart

Description:

arcana auth

Arcana Auth Flutter SDK












Arcana Auth Flutter SDK #
Mobile applications built with Flutter can easily onboard users and allow authenticated users to sign blockchain transactions by integrating with the Arcana Auth Flutter SDK. Arcana Auth enables the standard Ethereum provider for Web3 operations.
With Arcana Auth, users don't need to download a wallet extension or manage keys themselves to get started with interacting with any blockchain. Once authenticated, the Arcana wallet is instantly accessible to the user in the app's context.
Developers can use plug-and-play user authentication using the built-in login UI or create a custom UI to onboard users. One or more authentication mechanisms can be configured using the Arcana Dashboard for onboarding users. Before integrating, developers must register the app using the Arcana Developer Dashboard and obtain a unique client ID.
The following authentication mechanisms are supported:


Social Login

Discord
GitHub
Google
Steam (Coming Soon!)
Twitter
Twitch



Passwordless, OTP based authentication


Custom IAM

Cognito
Firebase (Coming Soon!)



➡ī¸ Using the SDK #
Follow these steps to configure and integrate Arcana Auth Flutter SDK with any mobile app using Flutter:
Step 1: Configure Auth #
Before you can install and integrate with the Arcana Auth Flutter SDK, first obtain a client ID for the Flutter app. Use the Arcana Developer Dashboard and register the app with Arcana Network. A unique client ID is assigned for each registered app. For details, see the 'How to configure Auth SDK' documentation.
Step 2: Installation #
The Arcana Auth Flutter SDK is available as a Flutter plugin package at Pub.dev.
Add the following line to the dependencies section in your app's pubspec.yaml file:
arcana_auth_flutter: ^0.0.7
copied to clipboard
Step 3: Integrate Auth with App #
As part of integrating a Flutter app with the Auth SDK, specify the unique client ID assigned to the registered app in the previous step when creating an AuthProvider.
import 'package:arcana_sdk/arcana_sdk.dart';

final auth = AuthProvider(clientId:"xar_xxxx_...");
auth.init(context: context);
copied to clipboard
Once initialized, you can call the AuthProvider functions for onboarding users and signing blockchain transactions.
Auth SDK Functionality #
Login/Logout #
Login with Social
Use social providers such as Google to onboard users by calling loginWithSocial with the appropriate provider string.
auth.loginWithSocial("google").then((_) => {
// On login Success
}).catchError(...);
copied to clipboard
Login with OTP
Onboard users to the Flutter app in a passwordless, no email-required manner with an OTP:
auth.loginWithOTP("${email_id}").then((_) => {
// On login Success
}).catchError(...);
copied to clipboard
Logout
auth.logout().then((_) => {
// On logout
});
copied to clipboard
Show/Hide wallet #
Once a user authenticates, they can access the Arcana wallet and sign blockchain transactions. The Flutter apps can control when the Arcana wallet is displayed by using the following functions:
auth.showWallet();
copied to clipboard
auth.hideWallet();
copied to clipboard
To determine in the Flutter app if the Arcana wallet is visible in the app's context, get the visibility status:
var isVisible = auth.isVisible();
copied to clipboard
Flutter apps can clear the Webview cache:
auth.clearCache();
copied to clipboard
Web3 Operations #
The AuthProvider supports the JSON-RPC requests for web3 operations:
EIP-1193 Request:
auth.request(method: "...", params: [...]).then(() => ...);
copied to clipboard
Get information for the logged in user:
auth.getUserInfo().then((UserInfo info) => ...);
copied to clipboard
Initiate send transaction request:
auth.sendTransaction({ to: "", value: "" }).then((hash) => ...);
copied to clipboard
Get user account address:
auth.getAccount().then((account) => ...);
copied to clipboard
📚 Documentation #
Check out Arcana Network documentation for the Flutter Apps Quick Start Guide, Arcana Wallet User Guide and the Arcana Developer Dashboard User Guide.
💡 Support #
For any support or integration-related queries, contact Arcana support team.
🤝 Contributing #
We welcome all contributions to the Arcana Auth SDK from the community. Read our contributing guide to learn about the SDK development process, how to propose bug fixes and improvements, and the code of conduct that we expect the participants to adhere to. Refer to the build and test section of this readme for details on how to test and validate your changes to the Auth SDK code before submitting your contributions.
ℹī¸ License #
Arcana Auth SDK is distributed under the MIT License.
For details see Arcana License.

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.