Skip to main content

Function: createConsentStore()

createConsentStore(__namedParameters): PostgresdbConsentStore

Defined in: packages/auth-postgresdb/src/stores/createConsentStore.ts:25

Creates a consent store backed by the oauth_consents table, for use with createRedirectConsentOnAuthorize.

Reads and deletes satisfy ConsentGrantStore; saveConsentGrant covers the write the consent page performs. Grants are single-use — the onAuthorize hook deletes each one as it consumes it.

Parameters

ParameterTypeDescription
__namedParameters{ model: typeof OAuthConsent; }-
__namedParameters.modeltypeof OAuthConsentThe OAuthConsent model class, taken from the app's db handle.

Returns

PostgresdbConsentStore