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
copied to clipboard
Usage #
Initialization #
import 'package:arcana_sdk/arcana_sdk.dart';
final auth = AuthProvider(clientId:"xar_xxxx_...");
auth.init(context: context);
copied to clipboard
Login/Logout #
Login with social
auth.loginWithSocial("google").then((_) => {
// On login Success
}).catchError(...);
copied to clipboard
Login with 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 #
To show the wallet
auth.showWallet();
copied to clipboard
To Hide the wallet
auth.hideWallet();
copied to clipboard
Get Visibility Status of the wallet
var isVisible = auth.isVisible();
copied to clipboard
To Clear Cache the Webview
auth.clearCache();
copied to clipboard
Methods #
Request (like EIP1193)
auth.request(method: "...", params: [...]).then(() => ...);
copied to clipboard
Get User Info
auth.getUserInfo().then((UserInfo info) => ...);
copied to clipboard
Send Transaction
auth.sendTransaction({ to: "", value: "" }).then((hash) => ...);
copied to clipboard
Get Account
auth.getAccount().then((account) => ...);
copied to clipboard
Logout
auth.logout();
copied to clipboard
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