Socket
Socket
Sign inDemoInstall

@huddle01/auth

Package Overview
Dependencies
15
Maintainers
5
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @huddle01/auth

Huddle01 Web Token Gating Library


Version published
Maintainers
5
Install size
11.0 MB
Created

Readme

Source

Huddle01 Auth SDK Add-On

https://huddle01-assets-frontend.s3.amazonaws.com/general/huddle01-logo-blue.svg

Web3-Native Zoom for Builders/DAOs/NFT Communities

Community · Documentation

Auth SDK Add-On

The Huddle01 React SDK offers a comprehensive suite of hooks, methods and event listeners that allow for seamless real-time audio and video communication with minimal coding required.

Pre Requisites

Before using the Huddle01 Auth Add-On, you must be acquainted with @huddle01/react or @huddle01/web-core or @huddle01/react-native

Installing the packages:

To get started with the Huddle01 React SDK, you can install the package using npm or pnpm or yarn:

npm install @huddle01/auth

Importing Methods:

After installing the package, you can initialize the SDK by using the useHuddle01 hook:

import {
  getAccessToken,
  getLensAccessToken,
  getLensMessage,
  getMessage,
} from '@huddle01/auth';

Auth Flow

1. Get message

ETH :

const address = '0x15900c698ee356E6976e5645394F027F0704c8Eb';

const message = getMessage(address);

Lens :

const address = '0x15900c698ee356E6976e5645394F027F0704c8Eb';

const message = getLensMessage(address);

2. Sign the message using your methods

E.g. Using wagmi

import { useSignMessage } from 'wagmi';

const { signature, signMessage } = useSignMessage;

signMessage(message);

3. Get Access Token from signature

ETH:

const accessToken = getAccessToken(signature, address);

Lens:

const accessToken = getLensAccessToken(signature, address);

4. Join Room using Access Token

import { useLobby } from '@huddle01/react';

const { joinLobby } = useLobby();

joinLobby('YOUR_ROOM_ID', accessToken);

💡 For more information head to https://huddle01.com/docs

💡 For any help reach out to us on Discord

Keywords

FAQs

Last updated on 18 Aug 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc