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 }