Web3Auth Single Factor Auth JS SDK
Web3Auth's @web3auth/single-factor-auth
SDK is simple and easy-to-use SDK, which helps you
implement the Web3Auth without redirection in a single key pair flow.
With the Web3Auth Plug and Play Web SDKs you can easily and quickly authenticate users and
reconstruct their private key. Web3Auth Plug and Play Web SDK redirects users to a Web3Auth-hosted
screen (i.e. https://auth.web3auth.io
). This flow is great for most use cases. Still, sometimes
you may want to customize the authentication flow such that you can have more control over the UI
and UX of the authentication process (i.e. to avoid the redirection). This can be achieved through
our new @web3auth/single-factor-auth
SDK, where now, you'll be able to use Web3Auth and avoid the
redirection to Auth Service hosted screens.
Requirements
- Basic knowledge of JavaScipt
- Supports all major JavaScript Frameworks, Libraries and Bundlers
- React Native
- React Native Release 0.71 and above (for Bare React Native Workflow)
- Expo SDK 48 and above (for Expo Managed Workflow)
- iOS Platform Target Version 14 and above
- Android Target SDK Version 31 and above
- Node.js
- One needs to re-initialize the SDK for each new user.
The minimum pricing plan to use this SDK in a production
environment is the Growth Plan since custom verifier setup is a needed feature for Core Kit
SDKs. You can use this SDK with all features enabled in sapphire_devnet
for free.
Resources
-
Quick Start: Get Started with an easy-to-follow integration of Web3Auth
-
Example Applications: Explore our example applications and try the SDK yourself.
-
Troubleshooting: Find quick solutions to common issues faced by developers.
-
Source Code: Web3Auth is open sourced. You can find the source code on our GitHub repository.
-
Community Support Portal: Join our community to get support from our team and other developers.
For an optimal flow that allows users to create an MFA setup if desired, use a combination of Web3Auth Single Factor Auth JS SDK and Web3Auth No Modal SDK for a one-key flow without redirection.
Helper SDKs
Provider packages
To make RPC calls within your dApp, Web3Auth exposes respective providers for different chains. This provider can be used to interact with the connected chain using exposed functions within the provider. Currently, Web3Auth supports providers for both EVM and Solana chains. For other chains, you can easily get the private key from the Web3Auth SDK.
Common Types and Interfaces
@web3auth/base
This package gives access to common types and interfaces for Web3Auth. This comes in handy by providing you with a standard way to import the values you need to work with the SDKs. We highly recommend using it while working with Typescript.