Function: createClientStore()
createClientStore(
__namedParameters):ClientStore
Defined in: packages/auth-postgresdb/src/stores/createClientStore.ts:71
Creates a ClientStore backed by the oauth_clients table, storing
client secrets by SHA-256 hash.
Because the secret is not recoverable, get omits client_secret and client
authentication goes through verifyClientSecret, which compares the
presented value against the stored hash. The engine only ever needs that
comparison — the registration response echoes the secret from the document it
just generated, never from a read — so nothing is lost by not keeping it.
register upserts, so re-registering an existing client_id replaces the
stored document rather than failing on the primary key.
Parameters
| Parameter | Type | Description |
|---|---|---|
__namedParameters | { model: typeof OAuthClient; } | - |
__namedParameters.model | typeof OAuthClient | The OAuthClient model class, taken from the app's db handle. |
Returns
ClientStore