Skip to main content

Function: createPostgresConsentStore()

createPostgresConsentStore(__namedParameters): ConsentGrantStore

Defined in: postgresConsentStore.ts:55

Creates a ConsentGrantStore backed by a Postgres table.

Expected table schema:

CREATE TABLE oauth_consent_grants (
code_challenge TEXT PRIMARY KEY,
subject TEXT NOT NULL,
scopes TEXT NOT NULL,
expires_at TIMESTAMPTZ NOT NULL
);

The query parameter is injected so the caller can use any runner (pg Pool, @ttoss/lambda-postgres-query, etc.).

Parameters

ParameterType
__namedParametersCreatePostgresConsentStoreOptions

Returns

ConsentGrantStore