Gathering detailed insights and metrics for @web3auth/base
Gathering detailed insights and metrics for @web3auth/base
Gathering detailed insights and metrics for @web3auth/base
Gathering detailed insights and metrics for @web3auth/base
Simple infrastructure that enables Web3 wallets and applications to provide seamless user logins for both mainstream and Web3.0 users.
npm install @web3auth/base
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
431 Stars
2,504 Commits
231 Forks
14 Watching
81 Branches
29 Contributors
Updated on 28 Nov 2024
TypeScript (89.66%)
JavaScript (4.7%)
CSS (4.45%)
HTML (1.2%)
Cumulative downloads
Total Downloads
Last day
-7.5%
4,114
Compared to previous day
Last week
3.8%
22,078
Compared to previous week
Last month
-8.6%
97,481
Compared to previous month
Last year
13.8%
1,266,253
Compared to previous year
Web3Auth is where passwordless auth meets non-custodial key infrastructure for Web3 apps and wallets. By aggregating OAuth (Google, Twitter, Discord) logins, different wallets and innovative Multi Party Computation (MPC) - Web3Auth provides a seamless login experience to every user on your application.
Checkout the official Web3Auth Documentation and SDK Reference to get started!
Plug and Play, OAuth based Web3 Authentication Service
Fully decentralized, non-custodial key infrastructure
End to end Whitelabelable solution
Threshold Cryptography based Key Reconstruction
Multi Factor Authentication Setup & Recovery (Includes password, backup phrase, device factor editing/deletion etc)
Support for WebAuthn & Passwordless Login
Support for connecting to multiple wallets
DApp Active Session Management
...and a lot more
For using Web3Auth in the web, you have two choices of SDKs to get started with.
Web3Auth Plug and Play Modal SDK @web3auth/modal
: A simple and easy to use SDK that will give you a simple modular way of implementing Web3Auth directly within your application. You can use the pre-configured Web3Auth Modal UI and whitelabel it according to your needs.
Web3Auth Plug and Play NoModal SDK @web3auth/no-modal
: The nomodal module implementing all the Web3Auth features you need and giving you the flexibility of using your own UI with the Web3Auth SDK working in the backend.
1npm install --save @web3auth/modal
Hop on to the Web3Auth Dashboard and create a new project. Use the Client ID of the project to start your integration.
Web3Auth needs to initialise as soon as your app loads up to enable the user to log in. Preferably done within a constructor, initialisation is the step where you can pass on all the configurations for Web3Auth you want. A simple integration for Ethereum blockchain will look like this:
1import { Web3Auth } from "@web3auth/modal"; 2 3//Initialize within your constructor 4const web3auth = new Web3Auth({ 5 clientId: "", // Get your Client ID from Web3Auth Dashboard 6 chainConfig: { 7 chainNamespace: "eip155", 8 chainId: "0x1", 9 }, 10}); 11 12await web3auth.initModal();
Once you're done initialising, just create a button that triggers to open the login modal for the user on their request. Logging in is as easy as:
1await web3auth.connect();
Packages | @latest Version | Size | Description |
---|---|---|---|
🏠 PnP Web | |||
@web3auth/no-modal | Provides the core logic for handling adapters within web3auth. This package acts as a manager for all the adapters. You should use this package to build your custom login UI on top of web3auth. | ||
@web3auth/modal | Provides the main class for using default web3auth modal. It inherits @web3auth/no-modal package. So you can still call all the functions available in the @web3auth/no-modal api reference. The package includes all of our packages and gives you a simple way of implementing Web3Auth within your interface. | ||
🪝 PnP Web Hooks | |||
@web3auth/modal-react-hooks | Provides React hooks for easy integration of Web3Auth Modal in React applications. Simplifies state management and Web3Auth interactions within React components. | ||
@web3auth/no-modal-react-hooks | Provides React hooks for integrating Web3Auth No Modal SDK in React applications. Offers flexibility for custom UI implementations while simplifying Web3Auth state management and interactions. | ||
🔌 Adapters | |||
@web3auth/coinbase-adapter | Adds coinbase login functionality | ||
@web3auth/auth-adapter | Adds social logins with MFA functionality | ||
@web3auth/torus-evm-adapter | Adds Torus Wallet login functionality (https://app.tor.us) | ||
@web3auth/torus-solana-adapter | Adds Solana Torus Wallet login functionality (https://solana.tor.us) | ||
@web3auth/wallet-connect-v2-adapter | Adds wallet connect v2 login functionality + all supported adapters (eg: Metamask mobile, rainbow etc.) | ||
🐉 Providers | |||
@web3auth/base-provider | Base implementation of JRPC provider | ||
@web3auth/ethereum-provider | EIP-1193 compatible JRPC provider | ||
@web3auth/solana-provider | Solana chain compatible JRPC provider | ||
🐉 Plugins | |||
@web3auth/wallet-services-plugin | Allows to inject your web3auth scoped private key into Wallet Services UI | ||
@web3auth/wallet-services-plugin-react-hooks | Allows to inject your web3auth scoped private key into Wallet Services UI | ||
@web3auth/solana-wallet-connector-plugin | Allows to inject your web3auth scoped private key into torus solana wallet UI (https://solana.tor.us) | ||
🐉 Low-Level | |||
@web3auth/base | Base reusable functionalities for creating a web3auth instance | ||
@web3auth/ui | Provides the UI used for creating the modal |
@babel/runtime
This module is distributed in 4 formats
esm
build dist/package.esm.js
in es6 formatcommonjs
build dist/package.cjs.js
in es5 formatumd
build dist/package.umd.min.js
in es5 format without polyfilling corejs minifiedBy default, the appropriate format is used for your specified usecase You can use a different format (if you know what you're doing) by referencing the correct file
The cjs build is not polyfilled with core-js. It is upto the user to polyfill based on the browserlist they target
CDN's serve the non-core-js polyfilled version by default. You can use a different
Please replace package and version with the appropriate package name
jsdeliver
1<script src="https://cdn.jsdelivr.net/npm/@web3auth/PACKAGE@VERSION"></script>
unpkg
1<script src="https://unpkg.com/@web3auth/PACKAGE@VERSION"></script>
Check out the examples for your preferred blockchain and platform on our examples page.
Checkout the Web3Auth Demo to see how Web3Auth can be used in your application.
Further checkout the demo folder within this repository, which contains other hosted demos for different usecases.
TODO:
No vulnerabilities found.
No security vulnerabilities found.