@suluk/better-auth - v0.2.0
    Preparing search index...

    Interface ApiKeyVerifierLike

    A duck-typed view of Better Auth's server verifyApiKey (the app injects betterAuth.api).

    interface ApiKeyVerifierLike {
        verifyApiKey(
            args: { body: { key: string; permissions?: Record<string, string[]> } },
        ): Promise<
            {
                valid: boolean;
                error?: { message?: string; code?: string }
                | null;
                key?:
                    | {
                        id?: string;
                        userId?: string;
                        name?: string;
                        permissions?: Record<string, string[]>
                        | null;
                        metadata?: unknown;
                    }
                    | null;
            },
        >;
    }
    Index

    Methods

    Methods

    • Parameters

      • args: { body: { key: string; permissions?: Record<string, string[]> } }

      Returns Promise<
          {
              valid: boolean;
              error?: { message?: string; code?: string }
              | null;
              key?:
                  | {
                      id?: string;
                      userId?: string;
                      name?: string;
                      permissions?: Record<string, string[]>
                      | null;
                      metadata?: unknown;
                  }
                  | null;
          },
      >