UNPKG

@better-auth-ui/core

Version:

Authentication components and data utilities for [Better Auth](https://better-auth.com), available for React and Solid.

65 lines (64 loc) 2.47 kB
import { AgentAuthAdapter } from './agent-auth-adapter'; import { AgentAuthLocalization } from './agent-auth-localization'; declare module "../../lib/view-paths" { interface AuthViewPaths { /** @default "agent-approval" */ agentApproval?: string; } } export type AgentAuthPluginOptions = { adapter: AgentAuthAdapter; localization?: Partial<AgentAuthLocalization>; /** URL segment used by Agent Auth's `deviceAuthorizationPage`. @default "agent-approval" */ path?: string; /** Add agent grant management to security settings. @default true */ grants?: boolean; }; export declare const agentAuthPlugin: ((options: AgentAuthPluginOptions) => { adapter: AgentAuthAdapter; localization: { approvalTitle: "Approve agent access"; approvalDescription: "Review what this agent wants to do on your behalf."; requestedCapabilities: "Requested capabilities"; requestReason: "Reason"; constraints: "Limits"; delegatedAgent: "Delegated agent"; autonomousAgent: "Autonomous agent"; approvalNone: "No extra check"; approvalSession: "Recent sign-in"; approvalWebauthn: "Passkey required"; allow: "Allow selected"; deny: "Deny"; approvedTitle: "Access approved"; approvedDescription: "The agent can now use the capabilities you selected."; deniedTitle: "Access denied"; deniedDescription: "The agent did not receive access."; noCapabilities: "This request has no pending capabilities."; invalidRequest: "This approval link is missing the agent identifier."; approvalError: "We could not update this request. Try again."; agents: "Agent access"; agentsDescription: "Review agents and revoke capabilities you no longer trust."; noAgents: "No agents have access to your account."; active: "Active"; pending: "Pending"; denied: "Denied"; revoked: "Revoked"; expires: "Expires {date}"; lastUsed: "Last used {date}"; neverUsed: "Never used"; revoke: "Revoke"; revokeTitle: "Revoke capability?"; revokeDescription: "The agent will immediately lose this capability."; confirmRevoke: "Revoke capability"; }; grants: boolean; viewPaths: { auth: { agentApproval: string; }; }; } & { id: "agentAuth"; }) & { id: "agentAuth"; };