@narangcia-oss/cryptic-auth-client-react
Version:
React hooks and components for cryptic-auth authentication with seamless OAuth2 integration
37 lines • 970 B
TypeScript
import React, { ReactNode } from "react";
export interface OAuthButtonProps {
/**
* OAuth provider name (e.g., 'google', 'github', 'discord')
*/
provider: string;
/**
* OAuth scopes to request
* @default ['profile', 'email']
*/
scopes?: string[];
/**
* Button content - can be text or custom JSX
*/
children?: ReactNode;
/**
* Additional CSS classes
*/
className?: string;
/**
* Custom button styles
*/
style?: React.CSSProperties;
/**
* Whether the button is disabled
*/
disabled?: boolean;
/**
* Callback called before initiating OAuth flow
*/
onBeforeLogin?: () => void;
}
/**
* Pre-built OAuth login button component
*/
export declare function OAuthButton({ provider, scopes, children, className, style, disabled, onBeforeLogin, }: OAuthButtonProps): import("react/jsx-runtime").JSX.Element;
//# sourceMappingURL=OAuthButton.d.ts.map