MCPcopy Create free account
hub / github.com/boringstack-xyz/boringstack / store

Method store

apps/api/src/lib/oauth/oauth.state.ts:61–67  ·  view source on GitHub ↗

* Persist a one-time state token (and optional PKCE verifier) for the * duration of one OAuth round-trip.

(state: string, stored: IStoredState = {})

Source from the content-addressed store, hash-verified

59 * duration of one OAuth round-trip.
60 */
61 async store(state: string, stored: IStoredState = {}): Promise<void> {
62 await this.getClient().setex(
63 `${OAUTH_STATE_PREFIX}${state}`,
64 OAUTH_STATE_TTL_SECONDS,
65 JSON.stringify(stored)
66 );
67 }
68
69 /**
70 * Read + delete the stored state. Returns `null` if absent (expired,

Callers 2

createAuthorizationURLFunction · 0.80

Calls 1

getClientMethod · 0.95

Tested by

no test coverage detected