0.0.5 • Published 10 months ago

piing-gatekeeper-v2-client v0.0.5

Weekly downloads
-
License
ISC
Repository
github
Last release
10 months ago

@piingltd/piing-gatekeeper-v2-client

Dev

Run alongside local site for development and testing (see repo README)

# hot update local site at /sites/{site name}
cd src/lib
pnpm build --watch

Publish

# build locally
pnpm build

# create a new version on npm
pnpm version patch/minor/major

# publish to npm
pnpm publish

Usage

### Handset

import { GatekeeperHandset, GatekeeperUtils } from '@piingltd/piing-gatekeeper-v2-client';

const params = new URLSearchParams(window.location.search);
const userSessionId = params.get('sessionId');

// Each time a new game is run
const sessionId = GatekeeperUtils.extractSessionIdFromSearchParams();
GatekeeperHandset.verifySessionId(userSessionId, serverSessionId);
0.0.5

10 months ago