MCPcopy
hub / github.com/twilio/twilio-video-app-react / getPasscode

Function getPasscode

src/state/usePasscodeAuth/usePasscodeAuth.ts:5–9  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3import { RoomType } from '../../types';
4
5export function getPasscode() {
6 const match = window.location.search.match(/passcode=(.*)&?/);
7 const passcode = match ? match[1] : window.sessionStorage.getItem('passcode');
8 return passcode;
9}
10
11export function fetchToken(name: string, room: string, passcode: string, create_room = true) {
12 return fetch(`/token`, {

Callers 2

usePasscodeAuthFunction · 0.85

Calls 1

getItemMethod · 0.80

Tested by

no test coverage detected