bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/pads/pads-graphql/sessions/service.ts
2024-04-02 14:25:50 -03:00

14 lines
422 B
TypeScript

const COOKIE_CONFIG = window.meetingClientSettings.public.pads.cookie;
const PATH = COOKIE_CONFIG.path;
const SAME_SITE = COOKIE_CONFIG.sameSite;
const SECURE = COOKIE_CONFIG.secure;
const setCookie = (sessions: Array<string>) => {
const sessionIds = sessions.join(',');
document.cookie = `sessionID=${sessionIds}; path=${PATH}; SameSite=${SAME_SITE}; ${SECURE ? 'Secure' : ''}`;
};
export default {
setCookie,
};