Skip to content

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

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

Defaulthttps://dynamodb.{region}.amazonaws.com

Endpoint URL for the DynamoDB service. Useful for local testing.

DynamoStorageOptions.pk?

Type string

The primary key column name.

DynamoStorageOptions.sk?

Type string

The sort key column name.

DynamoStorageOptions.table

Type string

The name of the DynamoDB table.