expo-passkey
Version:
Passkey authentication for Expo apps with Better Auth integration
112 lines • 3.81 kB
TypeScript
/**
* @file Revoke passkey endpoint
* @description Implementation of the endpoint to revoke a WebAuthn passkey
*/
import type { Logger } from "../utils/logger";
import type { ResolvedSchemaConfig } from "../../types";
/**
* Create endpoint to revoke a passkey
*/
export declare const createRevokeEndpoint: (options: {
logger: Logger;
schemaConfig: ResolvedSchemaConfig;
}) => {
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
body: {
userId: string;
credentialId: string;
reason?: string | undefined;
};
} & {
method?: "POST" | undefined;
} & {
query?: Record<string, any> | undefined;
} & {
params?: Record<string, any>;
} & {
request?: Request;
} & {
headers?: HeadersInit;
} & {
asResponse?: boolean;
returnHeaders?: boolean;
use?: import("better-call").Middleware[];
path?: string;
} & {
asResponse?: AsResponse | undefined;
returnHeaders?: ReturnHeaders | undefined;
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
headers: Headers;
response: {
success: boolean;
};
} : {
success: boolean;
}>;
options: {
method: "POST";
body: import("zod").ZodObject<{
userId: import("zod").ZodString;
credentialId: import("zod").ZodString;
reason: import("zod").ZodOptional<import("zod").ZodString>;
}, "strip", import("zod").ZodTypeAny, {
userId: string;
credentialId: string;
reason?: string | undefined;
}, {
userId: string;
credentialId: string;
reason?: string | undefined;
}>;
metadata: {
openapi: {
description: string;
tags: string[];
responses: {
200: {
description: string;
content: {
"application/json": {
schema: {
type: "object";
properties: {
success: {
type: string;
};
};
};
};
};
};
404: {
description: string;
content: {
"application/json": {
schema: {
type: "object";
properties: {
error: {
type: string;
properties: {
code: {
type: string;
};
message: {
type: string;
};
};
};
};
};
};
};
};
};
};
};
} & {
use: any[];
};
path: "/expo-passkey/revoke";
};
//# sourceMappingURL=revoke.d.ts.map