tiny-essentials
Version:
Collection of small, essential scripts designed to be used across various projects. These simple utilities are crafted for speed, ease of use, and versatility.
23 lines • 1.1 kB
text/typescript
/**
* Middleware function to handle Discord and Firebase sessions, including login, logout,
* and redirection functionalities.
*
* @param {Record<string, any>} app - The Express.js app object.
* @param {Record<string, any>} cfg - The configuration object for the middleware, including Firebase settings.
* @throws {Error} Throws an error if the configuration object is invalid.
*/
export default function cookieSession(app: Record<string, any>, cfg: Record<string, any>): {
auth: any;
commandAuth: any;
addGuildMember: (data: any) => Promise<Record<string, any>>;
getGuildWidget: (guildID: any) => Promise<Record<string, any>>;
uidGenerator: (userID: any) => string;
sessionValidator: (data?: {}) => (req: any, res: any, next: any) => void;
sessionPlugins: {
validator: (req: any, res: any, next: any) => void;
getUser: (req: any, res: any, next: any) => void;
getUserConnections: (req: any, res: any, next: any) => void;
getUserGuilds: (req: any, res: any, next: any) => void;
};
};
//# sourceMappingURL=cookie-session.d.mts.map