@huddle01/auth
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

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

Package Sidebar

Install

npm i @huddle01/auth

Weekly Downloads

7

Version

0.0.2

License

ISC

Unpacked Size

641 kB

Total Files

10

Last publish

Collaborators

  • akash_huddle01
  • maxwang0223
  • itsomg
  • mizanxali
  • deepso7
  • 0xvaibhav
  • support01
  • a4748g