Skip to content

verifyPortalToken

function verifyPortalToken(secret, token): Promise<{
applicationKey: string;
}>;

Defined in: src/portal.ts:98

Verify a portal token: format, signature (constant time), then expiry. Returns the granted application key on success; throws PortalTokenError otherwise.

Parameter Type
secret TokenSecret
token string

Promise<{ applicationKey: string; }>

import { verifyPortalToken } from "@xtandard/webhooks";
const { applicationKey } = await verifyPortalToken(secret, token);