Function: createAuthCodeStore()
createAuthCodeStore(
__namedParameters):AuthCodeStore
Defined in: packages/auth-postgresdb/src/stores/createAuthCodeStore.ts:16
Creates an AuthCodeStore backed by the oauth_auth_codes table,
storing codes by SHA-256 hash.
The engine hands the store the plaintext code on every call and never compares
the returned code against anything — it reads only clientId,
redirectUri, codeChallenge, scopes, subject, and expiresAt. So the
adapter hashes to find the row and echoes the presented value back, and a
database dump yields no replayable codes.
Parameters
| Parameter | Type | Description |
|---|---|---|
__namedParameters | { model: typeof OAuthAuthCode; } | - |
__namedParameters.model | typeof OAuthAuthCode | The OAuthAuthCode model class, taken from the app's db handle. |
Returns
AuthCodeStore