arcana_auth_flutter 0.0.6 arcana_auth_flutter: ^0.0.6 copied to clipboard
Arcana Auth flutter SDK
Arcana SDK #
A well typed React Native library providing support for Crypto wallet Authentication on iOS and Android, including support for all currency variants.
Prerequisites to using this library #
- (iOS only) You are using Xcode version 11 or higher. This will allow you to develop using iOS version 13 and higher, when the APIs for Sign In with Apple became available.
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.6
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 #
Keyword #
oauth, social, authentication, passwordless, signup, login, web3, wallet, reactnative