denoland / deno_kv_oauth

High-level OAuth 2.0 powered by Deno KV.
https://jsr.io/@deno/kv-oauth
MIT License
263 stars 28 forks source link

suggestion: BYO `Deno.Kv` instance #309

Open MarkTiedemann opened 9 months ago

MarkTiedemann commented 9 months ago

Currently, this module always opens a new Deno.Kv instance.

https://github.com/denoland/deno_kv_oauth/blob/9dfc2a712ea2288a03b6e7f5875b74f6d75f5124/lib/_kv.ts#L10

Would it make sense to add a kv property to the CreateHelperOptions when calling createHelpers?

Simply put, Bring Your Own KV. :)

Advantages:

iuioiua commented 9 months ago

We previously considered doing this and decided not to to make the data only accessible to the module. Let me ask a few more questions internally and get back to you.