Skip to main content

@buildel/buildel-auth

Package for authentication

const buildelAuth = new BuildelAuth(process.env.BUILDEL_API_KEY);

Methods

generateAuth(socketId: string, channelName: string, userData?: Record<string, any>): { auth: string; user_data: string; }

Generated object

Response

propertydescription
authrandom string for authentication purposes
user_datastringified object with user's metadata

createAuthMessage(socketId: string, channelName: string, userJSON: string): string;