Email & Social Wallets
AppKit enables passwordless Web3 onboarding and authentication, allowing your users interact with your application by creating a non-custodial wallet with just their emails or social accounts.
Remember to whitelist your dapp's iOS's bundleId and Android's packageName in your cloud configuration.
- LogIn into https://cloud.reown.com
- Open Dashboard and scroll down to Mobile Application IDs menu
- Add your iOS Bundle ID and your Android Package Name
Social Login are avaiable from version 1.2.0-beta01
Integration
In order to support Email and Social Wallets creation just set featuresConfig:
parameter in ReownAppKitModal
initialization.
final _appKitModal = ReownAppKitModal(
context: context,
projectId: '{YOUR_PROJECT_ID}',
metadata: const PairingMetadata(
name: 'Example App',
description: 'Example app description',
url: 'https://example.com/',
icons: ['https://example.com/logo.png'],
redirect: Redirect(
native: 'exampleapp://',
universal: 'https://reown.com/exampleapp',
),
),
featuresConfig: FeaturesConfig(
email: true,
socials: [
AppKitSocialOption.Farcaster,
AppKitSocialOption.X,
AppKitSocialOption.Apple,
AppKitSocialOption.Discord,
],
showMainWallets: false,
),
);
Options
- email
bool
: This boolean defines whether you want to enable email login. Defaulttrue
- socials
List<AppKitSocialOption>
: This list contains the list of social platforms that you want to enable for user authentication. The platforms in the example include Farcaster, X, Discord. Is empty by default, it means that no social options is enabled. - showMainWallets
bool
_ : This boolean defines whether you want to show the main wallet options on the first connect screen. If this isfalse
it will show a button that directs you to a new screen displaying all avaiable wallets. Defaulttrue
.
In order for Email Wallet to work propertly, AppKitModalConnectButton()
has to be instantiated during the whole lifetime of the app.
If you already use AppKitModalConnectButton()
then nothing else has to be done, but in case you don't use it but still want to support Email Wallets you can instantiate and hide it as follows:
AppKitModalConnectButton(
appKit: _appKitModal,
custom: SizedBox.shrink(), // Will make the button invisible
),
User Flow
-
Users will be able to connect to you application by simply using an email address. AppKit will send to them a One Time Password (OTP) to copy and paste in the modal, which will help to verify the user's authenticity. This will create a non-custodial wallet for your user which will be available in any application that integrates AppKit and Email Wallets.
-
Eventually the user can optionally choose to move from a non-custodial wallet to a self-custodial one by pressing "Upgrade Wallet" on AppKit. This will open the (Reown secure website) that will walk your user through the upgrading process.
Due to Safari’s strict third-party cookie policies, the SDK is not preserving sessions after the app is terminated (removed from memory). So upon app termination the user will have to re-authenticate themself through a new OTP code if they want to sign. Our team is working to solve this issue soon.