# @web3auth/openlogin-adapter

> openlogin adapter for web3auth

Latest version **8.12.4** (published 2024-08-21) · ISC license · 0 weekly downloads

## Install

```sh
npm install @web3auth/openlogin-adapter
pnpm add @web3auth/openlogin-adapter
yarn add @web3auth/openlogin-adapter
bun add @web3auth/openlogin-adapter
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 8.12.4 |
| Published | 2024-08-21 |
| First published | 2022-01-11 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=18.x |
| Dependencies | 5 |
| Unpacked size | 477.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 490 |
| Author | Torus Labs |
| Maintainers | archit_web3, himanshunpm009, chaitanyapotti |
| Keywords | web3Auth/openlogin-adapter, web3Auth, multichainWallet, blockchain, ethereum, solana |

## Links

- npm: https://www.npmjs.com/package/@web3auth/openlogin-adapter
- Repository: https://github.com/Web3Auth/Web3Auth
- Homepage: https://github.com/Web3Auth/Web3Auth/tree/master/packages/adapters/openlogin-adapter#readme
- Issues: https://github.com/Web3Auth/Web3Auth/issues
- npm.io page: https://npm.io/package/@web3auth/openlogin-adapter

## Dependencies (5)

- [lodash.merge](https://npm.io/package/lodash.merge.md) ^4.6.2
- [@web3auth/base](https://npm.io/package/@web3auth/base.md) ^8.12.4
- [@toruslabs/openlogin](https://npm.io/package/@toruslabs/openlogin.md) ^8.2.1
- [@web3auth/base-provider](https://npm.io/package/@web3auth/base-provider.md) ^8.12.4
- [@toruslabs/openlogin-utils](https://npm.io/package/@toruslabs/openlogin-utils.md) ^8.2.1

## Alternatives

- [@clerk/clerk-expo](https://npm.io/package/@clerk/clerk-expo.md) — 133.6K weekly downloads
- [@pothos/plugin-authz](https://npm.io/package/@pothos/plugin-authz.md) — 12.4K weekly downloads
- [@bounded-sh/client](https://npm.io/package/@bounded-sh/client.md) — 3.2K weekly downloads
- [@luigi-project/plugin-auth-oauth2](https://npm.io/package/@luigi-project/plugin-auth-oauth2.md) — 2.3K weekly downloads
- [@nocobase/plugin-verification](https://npm.io/package/@nocobase/plugin-verification.md) — 2.0K weekly downloads

## Recent versions

- 8.12.4 (latest) — 2024-08-21
- 9.0.0-alpha.0 (next) — 2024-09-09
- 8.12.2 — 2024-08-13
- 8.12.0 — 2024-07-25
- 8.11.0 — 2024-07-25
- 8.8.0 — 2024-07-04
- 8.7.0 — 2024-06-26
- 8.6.2 — 2024-05-29
- 8.6.1 — 2024-05-21
- 8.6.0-alpha.0 — 2024-05-20
- 8.5.0 — 2024-05-15
- 8.5.0-alpha.3 — 2024-05-14
- 8.5.0-alpha.0 — 2024-05-09
- 8.4.1 — 2024-05-07
- 8.4.0 — 2024-04-29
- … 118 more at https://npm.io/package/@web3auth/openlogin-adapter/versions

## README

# Web3Auth Openlogin Adapter

[![npm version](https://img.shields.io/npm/v/@web3auth/openlogin-adapter?label=%22%22)](https://www.npmjs.com/package/@web3auth/openlogin-adapter/v/latest)
[![minzip](https://img.shields.io/bundlephobia/minzip/@web3auth/openlogin-adapter?label=%22%22)](https://bundlephobia.com/result?p=@web3auth/openlogin-adapter@latest)

> 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.

This adapter is a wrapper around the [`openlogin`](https://www.npmjs.com/package/@toruslabs/openlogin) library from Web3Auth (previously Torus) and enables the main social login features of Web3Auth. By default, Web3Auth has
certain configuration set to enable a quick integration, however, for customising features, like Whitelabel,
Custom Authentication, etc. you need to customise the Openlogin Adapter. With the Openlogin Adapter package installed and
instantiated, you can explore a number of options and can customise the login experience of the user as per your needs.

## 📖 Documentation

Read more about the Web3Auth Openlogin Adapter in the [official Web3Auth Documentation](https://web3auth.io/docs/sdk/web/openlogin).

## 💡 Features

- 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

## 📄 Basic Details

- Adapter Name: `openlogin`

- Package Name: [`@web3auth/openlogin-adapter`](https://web3auth.io/docs/sdk/web/openlogin)

- authMode: `WALLET`, `DAPP`

- chainNamespace: `EIP155`,`SOLANA`

- Default: `YES`

## 🔗 Installation

```shell
npm install --save @web3auth/openlogin-adapter
```

## 🩹 Example

### Using with `web3auth/web3auth` (Web3Auth Plug and Play Modal Package)

```js
const openloginAdapter = new OpenloginAdapter({
  adapterSettings: {
    clientId,
    network: "testnet",
    uxMode: "popup",
    whiteLabel: {
      name: "Your app Name",
      logoLight: "https://web3auth.io/images/w3a-L-Favicon-1.svg",
      logoDark: "https://web3auth.io/images/w3a-D-Favicon-1.svg",
      defaultLanguage: "en",
      dark: true, // whether to enable dark mode. defaultValue: false
    },
    loginConfig: {
      // Add login configs corresponding to the providers on modal
      // Google login
      google: {
        name: "Custom Auth Login",
        verifier: "YOUR_GOOGLE_VERIFIER_NAME", // Please create a verifier on the developer dashboard and pass the name here
        typeOfLogin: "google", // Pass on the login provider of the verifier you've created
        clientId: "GOOGLE_CLIENT_ID.apps.googleusercontent.com", // Pass on the clientId of the login provider here - Please note this differs from the Web3Auth ClientID. This is the JWT Client ID
      },
      // Facebook login
      facebook: {
        name: "Custom Auth Login",
        verifier: "YOUR_FACEBOOK_VERIFIER_NAME", // Please create a verifier on the developer dashboard and pass the name here
        typeOfLogin: "facebook", // Pass on the login provider of the verifier you've created
        clientId: "FACEBOOK_CLIENT_ID_1234567890", // Pass on the clientId of the login provider here - Please note this differs from the Web3Auth ClientID. This is the JWT Client ID
      },
      // Add other login providers here
    },
  },
  loginSettings: {
    mfaLevel: "mandatory",
  },¯
});
web3auth.configureAdapter(openloginAdapter);
```

### Using with `web3auth/no-modal` (Web3Auth Plug and Play NoModal Package)

```js
const openloginAdapter = new OpenloginAdapter({
  adapterSettings: {
    clientId,
    network: "testnet",
    uxMode: "popup",
    whiteLabel: {
      name: "Your app Name",
      logoLight: "https://web3auth.io/images/w3a-L-Favicon-1.svg",
      logoDark: "https://web3auth.io/images/w3a-D-Favicon-1.svg",
      defaultLanguage: "en",
      dark: true, // whether to enable dark mode. defaultValue: false
    },
    loginConfig: {
      jwt: {
        name: "Web3Auth-Auth0-JWT",
        verifier: "web3auth-auth0",
        typeOfLogin: "jwt",
        clientId: "294QRkchfq2YaXUbPri7D6PH7xzHgQMT",
      },
    },
  },
});
web3auth.configureAdapter(openloginAdapter);
```

Checkout the examples for your preferred blockchain and platform in our [examples repository](https://github.com/Web3Auth/examples/)

## 🌐 Demo

Checkout the [Web3Auth Demo](https://demo-app.web3auth.io/) to see how Web3Auth can be used in your application.

## 💬 Troubleshooting and Support

- Have a look at our [Community Portal](https://community.web3auth.io/) to see if anyone has any questions or issues you might be having. Feel free to reate new topics and we'll help you out as soon as possible.
- Checkout our [Troubleshooting Documentation Page](https://web3auth.io/docs/troubleshooting) to know the common issues and solutions.
- For Priority Support, please have a look at our [Pricing Page](https://web3auth.io/pricing.html) for the plan that suits your needs.

---
_Source: https://npm.io/package/@web3auth/openlogin-adapter · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
