UNPKG

ai-auth

Version:

Complete Auth-Agent SDK - Agent authentication for AI developers + OAuth client integration for website developers

78 lines 2.05 kB
import React from 'react'; export interface SignInWithAuthAgentProps { /** * OAuth client ID registered with Auth-Agent */ clientId: string; /** * Redirect URI after authentication (must match registered URI) */ redirectUri: string; /** * Auth-Agent server URL * @default 'https://auth-agent.com' */ authServerUrl?: string; /** * OAuth scopes to request * @default 'openid profile email' */ scope?: string; /** * Custom width in pixels * @default 280 */ width?: number; /** * Custom height in pixels * @default 48 */ height?: number; /** * Optional state parameter for CSRF protection */ state?: string; /** * PKCE code challenge (OAuth 2.1 requirement) */ codeChallenge?: string; /** * PKCE code challenge method * @default 'S256' */ codeChallengeMethod?: 'S256' | 'plain'; /** * Callback when button is clicked (before redirect) */ onClick?: () => void; /** * Additional CSS class name (styling is enforced, only positioning allowed) */ className?: string; } /** * Official "Sign in with Auth-Agent" button component * * This button enforces Auth-Agent branding standards and cannot be customized * beyond width and height. This ensures consistent user experience across all * integrations. * * Features: * - Enforced branding (logo, colors, text) * - Custom width and height * - OAuth 2.1 compliant with PKCE * - Automatic redirect handling * * @example * ```tsx * <SignInWithAuthAgent * clientId="your_client_id" * redirectUri="https://yourapp.com/auth/callback" * width={300} * height={50} * /> * ``` */ export declare function SignInWithAuthAgent({ clientId, redirectUri, authServerUrl, scope, width, height, state, codeChallenge, codeChallengeMethod, onClick, className, }: SignInWithAuthAgentProps): React.JSX.Element; export default SignInWithAuthAgent; //# sourceMappingURL=Button.d.ts.map