Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/adapters/elysia/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
* })
Expand Down
4 changes: 2 additions & 2 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -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
}

Expand Down
Loading