Skip to content

Cloudflare KV

Reference doc for the Cloudflare KV storage adapter.

Configure OpenAuth to use Cloudflare KV as a storage adapter.

import { CloudflareStorage } from "@openauthjs/openauth/storage/cloudflare"
const storage = CloudflareStorage({
namespace: "my-namespace"
})
export default issuer({
storage,
// ...
})

Methods

CloudflareStorage

CloudflareStorage(options)

Parameters

Returns StorageAdapter

Creates a Cloudflare KV store.

CloudflareStorageOptions

Configure the Cloudflare KV store that’s created.

CloudflareStorageOptions.namespace

Type KVNamespace