From 6d9af7fc251c60e3e3e58d2788ec36f1e570b33c Mon Sep 17 00:00:00 2001 From: Tomas Pozo Date: Fri, 19 Jun 2026 15:49:51 -0500 Subject: [PATCH] docs: refresh stale auth-API references in JSDoc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The allow→auth / 'always'→'none' / 'public'→'publishable' / authType→authMode rename was already applied across the prose docs, but a few JSDoc reference comments (which feed the typedoc API reference) still used the old names: - AuthResult doc: "public" → "publishable" - keyName doc: "always" → "none" - Elysia plugin @example blocks: allow: 'user' → auth: 'user' --- src/adapters/elysia/plugin.ts | 4 ++-- src/types.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/adapters/elysia/plugin.ts b/src/adapters/elysia/plugin.ts index 846b59f..7fd31e4 100644 --- a/src/adapters/elysia/plugin.ts +++ b/src/adapters/elysia/plugin.ts @@ -29,7 +29,7 @@ export class SupabaseError extends Error { * import { withSupabase } from '@supabase/server/adapters/elysia' * * const app = new Elysia() - * .use(withSupabase({ allow: 'user' })) + * .use(withSupabase({ auth: 'user' })) * .get('/games', async ({ supabaseContext }) => { * const { data } = await supabaseContext.supabase.from('favorite_games').select() * return data @@ -47,7 +47,7 @@ export class SupabaseError extends Error { * .get('/health', () => ({ status: 'ok' })) * .group('/api', (app) => * app - * .use(withSupabase({ allow: 'user' })) + * .use(withSupabase({ auth: 'user' })) * .get('/profile', async ({ supabaseContext }) => { * return supabaseContext.userClaims * }) diff --git a/src/types.ts b/src/types.ts index 438e11e..709f823 100644 --- a/src/types.ts +++ b/src/types.ts @@ -132,7 +132,7 @@ export interface Credentials { * Result of credential verification. * * Contains the resolved auth mode, the verified token (for `"user"` mode), - * decoded JWT claims, and the matched key name (for `"public"` / `"secret"` modes). + * decoded JWT claims, and the matched key name (for `"publishable"` / `"secret"` modes). * * @see {@link verifyCredentials} * @see {@link verifyAuth} @@ -150,7 +150,7 @@ export interface AuthResult { /** Raw JWT payload, or `null` when no JWT is present. */ jwtClaims: JWTClaims | null - /** Name of the matched key (e.g. `"default"`, `"mobile"`), or `null` for `"user"` / `"always"` modes. */ + /** Name of the matched key (e.g. `"default"`, `"mobile"`), or `null` for `"user"` / `"none"` modes. */ keyName?: string | null }