DynamoDB
Reference doc for the DynamoDB storage adapter.
Configure OpenAuth to use DynamoDB as a storage adapter.
import { DynamoStorage } from "@openauthjs/openauth/storage/dynamo"
const storage = DynamoStorage({ table: "my-table", pk: "pk", sk: "sk"})
export default issuer({ storage, // ...})
Methods
DynamoStorage
DynamoStorage(options)
Parameters
The config for the adapter.options
DynamoStorageOptions
Returns StorageAdapter
Creates a DynamoDB store.
DynamoStorageOptions
Configure the DynamoDB table that’s created.
{ table: "my-table", pk: "pk", sk: "sk"}
DynamoStorageOptions.endpoint?
Type string
Default “https://dynamodb.{region}.amazonaws.com”
Endpoint URL for the DynamoDB service. Useful for local testing.
DynamoStorageOptions.pk?
Type string
Default “pk”
The primary key column name.
DynamoStorageOptions.sk?
Type string
Default “sk”
The sort key column name.
DynamoStorageOptions.table
Type string
The name of the DynamoDB table.
DynamoStorageOptions.ttl?
Type string
Default “expiry”
The name of the time to live attribute.