Arcana SDK

This SDK with get Authentication from the Arcana SDK

Installation

This plugin is available on Pub: https://pub.dev/packages/arcana_auth_flutter

Add this to dependencies in your app's pubspec.yaml

  arcana_auth_flutter: ^0.0.5

Usage

Initialization

import 'package:arcana_sdk/arcana_sdk.dart';

final auth = AuthProvider(clientId:"xar_xxxx_...");
auth.init(context: context);

Login/Logout

Login with social

auth.loginWithSocial("google").then((_) => {
  // On login Success
}).catchError(...);

Login with OTP

auth.loginWithOTP("${email_id}").then((_) => {
  // On login Success
}).catchError(...);

Logout

auth.logout().then((_) => {
  // On logout
});

Show/Hide wallet

To show the wallet

auth.showWallet();

To Hide the wallet

auth.hideWallet();

Get Visibility Status of the wallet

var isVisible = auth.isVisible();

To Clear Cache the Webview

auth.clearCache();

Methods

Request (like EIP1193)

auth.request(method: "...", params: [...]).then(() => ...);

Get User Info

auth.getUserInfo().then((UserInfo info) => ...);

Send Transaction

auth.sendTransaction({ to: "", value: "" }).then((hash) => ...);

Get Account

auth.getAccount().then((account) => ...);

Logout

auth.logout();

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

Keyword

oauth, social, authentication, passwordless, signup, login, web3, wallet, reactnative

Libraries

arcana_sdk
common
strings