Huddle01 Auth SDK Add-On
Web3-Native Zoom for Builders/DAOs/NFT Communities
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