File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,11 +30,7 @@ export default defineNuxtModule({
3030
3131 const env = process . env . VERCEL_ENV
3232
33- nitroConfig . storage [ 'oauth-atproto-state' ] = {
34- driver : env === 'production' ? 'vercel-kv' : 'vercel-runtime-cache' ,
35- }
36-
37- nitroConfig . storage [ 'oauth-atproto-session' ] = {
33+ nitroConfig . storage . atproto = {
3834 driver : env === 'production' ? 'vercel-kv' : 'vercel-runtime-cache' ,
3935 }
4036 } )
Original file line number Diff line number Diff line change @@ -152,17 +152,9 @@ export default defineNuxtConfig({
152152 driver : 'fsLite' ,
153153 base : './.cache/fetch' ,
154154 } ,
155- 'oauth- atproto-state ' : {
155+ 'atproto' : {
156156 driver : 'fsLite' ,
157- base : './.cache/atproto-oauth/state' ,
158- } ,
159- 'oauth-atproto-session' : {
160- driver : 'fsLite' ,
161- base : './.cache/atproto-oauth/session' ,
162- } ,
163- 'generic-cache' : {
164- driver : 'fsLite' ,
165- base : './.cache/generic' ,
157+ base : './.cache/atproto' ,
166158 } ,
167159 } ,
168160 typescript : {
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import type { H3Event } from 'h3'
44/**
55 * Storage key prefix for oauth session storage.
66 */
7- export const OAUTH_SESSION_CACHE_STORAGE_BASE = 'oauth- atproto-session'
7+ export const OAUTH_SESSION_CACHE_STORAGE_BASE = 'atproto:oauth -session'
88
99export class OAuthSessionStore implements NodeSavedSessionStore {
1010 // TODO: not sure if we will support multi accounts, but if we do in the future will need to change this around
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import type { H3Event } from 'h3'
44/**
55 * Storage key prefix for oauth state storage.
66 */
7- export const OAUTH_STATE_CACHE_STORAGE_BASE = 'oauth- atproto-state'
7+ export const OAUTH_STATE_CACHE_STORAGE_BASE = 'atproto:oauth -state'
88
99export class OAuthStateStore implements NodeSavedStateStore {
1010 private readonly cookieKey = 'oauth:atproto:state'
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ function isCacheEntryStale(entry: LocalCachedEntry): boolean {
2323 * Local implmentation of a cache to be used during development
2424 */
2525export class LocalCacheAdapter implements CacheAdapter {
26- private readonly storage = useStorage ( 'generic-cache ' )
26+ private readonly storage = useStorage ( 'atproto: generic' )
2727
2828 async get < T > ( key : string ) : Promise < T | undefined > {
2929 const result = await this . storage . getItem < LocalCachedEntry < T > > ( key )
You can’t perform that action at this time.
0 commit comments