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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
secret |
TokenSecret |
token |
string |
Returns
Section titled “Returns”Promise<{
applicationKey: string;
}>
Example
Section titled “Example”import { verifyPortalToken } from "@xtandard/webhooks";
const { applicationKey } = await verifyPortalToken(secret, token);