
Product
Socket Now Protects the Firefox Extension Ecosystem
Socket is bringing experimental protection to Firefox, scanning 97,000+ extensions in Mozilla's official directory for malware and risky updates.
@yawlabs/session
Advanced tools
Sign, verify, and extract the Yaw account session token (yaw_team) -- the single source of truth for the HMAC token format shared across Yaw Labs services.
Sign, verify, and extract the Yaw account session token — the HMAC-signed
yaw_team value that yaw.sh issues at sign-in. Any Yaw Labs service holding
the shared secret can verify a session offline, with no callback to
yaw.sh.
This package is the single source of truth for the token format. Before it, the sign/verify pair was hand-copied across yaw.sh, vew, and vew.sh — and the copies drifted.
token = base64url(JSON payload) + "." + base64url(HMAC-SHA256(secret, body))
payload = { order_id, email, role, iat, exp (ms since epoch), tier? }
import {
verifyYawSession,
sessionFromHeaders,
signToken,
verifyToken,
} from '@yawlabs/session';
// Netlify function / Node handler:
const token = sessionFromHeaders(headersObject); // Bearer first, cookie fallback
const session = verifyYawSession(token, process.env.ADMIN_SESSION_SECRET);
if (!session) return unauthorized();
// session: { order_id, email, role, iat, exp, tier? }
Two layers:
signToken / verifyToken — the format: HMAC integrity (constant-time)
plus expiry. No claim policy; bring your own (e.g. a dashboard cookie with
different claims can share the format).signYawSession / verifyYawSession — the yaw_team policy: requires
the load-bearing claims (order_id, email, role) on top of the format.
Fails closed: any malformed, tampered, expired, or claim-incomplete token
returns null.Helpers: parseCookies, sessionCookieHeader, clearSessionCookieHeader,
YAW_SESSION_COOKIE.
node:crypto only).Tag-push driven: bump package.json, commit, git tag vX.Y.Z,
git push --follow-tags. CI publishes to npm.
FAQs
Sign, verify, and extract the Yaw account session token (yaw_team) -- the single source of truth for the HMAC token format shared across Yaw Labs services.
The npm package @yawlabs/session receives a total of 0 weekly downloads. As such, @yawlabs/session popularity was classified as not popular.
We found that @yawlabs/session demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket is bringing experimental protection to Firefox, scanning 97,000+ extensions in Mozilla's official directory for malware and risky updates.

Research
/Security News
Three compromised Rust crates pulled in a malicious dependency that downloaded and executed cross-platform malware during Cargo builds.

Research
/Security News
Socket uncovered 77 linked Firefox extensions, including 40 that steal wallet secrets or credentials and 37 deceptive sports-score shells.