Module exposing: oauthClientsOptions
// Source: https://github.com/better-auth-ui/better-auth-ui | License: MIT | Copyright 2025 daveycodez
// Provided via justclaw.it.com; keep this notice with the code.
import { type QueryOptions, skipToken } from "@tanstack/query-core"
import type {
ManagedOAuthClient,
OAuthClientManager,
OAuthClientOwner
} from "./oauth-client-manager"
import { oauthProviderQueryKeys } from "./oauth-provider-query-keys"
export type OAuthClientsOptions = Omit<
QueryOptions<ManagedOAuthClient[]>,
"queryKey" | "queryFn"
>
export function oauthClientsOptions(
manager: OAuthClientManager,
owner: OAuthClientOwner,
ownerKey?: string
) {
return {
queryKey: oauthProviderQueryKeys.clients(ownerKey),
queryFn: ownerKey
? async ({ signal }) =>
(await manager.list(owner, sign
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key