
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
react-native-altcha
Advanced tools
The AltchaWidget is a CAPTCHA-like React Native component that provides a secure, privacy-friendly way to verify that a user is human — without the frustration of traditional CAPTCHAs.
It uses a cryptographic proof-of-work mechanism combined with an optional code challenge, making it resilient against bots and spam.
ALTCHA is an open-source alternative to traditional CAPTCHA, designed to be fast, accessible, and privacy-respecting.
For more information and documentation, visit altcha.org.
Install peer dependencies
npx expo install expo-audio expo-crypto expo-localization react-native-svg
With npm:
npm install react-native-altcha
Or with Yarn:
yarn add react-native-altcha
import React from 'react';
import { View } from 'react-native';
import { AltchaWidget } from 'react-native-altcha';
export default function App() {
return (
<View style={{ padding: 16 }}>
<AltchaWidget
challengeUrl="https://api.example.com/altcha/challenge"
debug={true}
onVerified={(payload) => {
// Send the payload to your backend
console.log('Payload:', payload);
}}
/>
</View>
);
}
One of challengeUrl or challengeJson is required.
The widget will return the ALTCHA payload via onVerified, which you should send to your server for verification.
| Prop | Type | Description |
|---|---|---|
challengeUrl | string | URL to fetch the challenge JSON |
challengeJson | object | Challenge object provided directly |
colorScheme | 'light' | 'dark' | Force color scheme (optional, otherwise follows system) |
locale | string | Language to use (defaults to en) |
onFailed | (error: any) => void | Called with an error on verification failure |
onVerified | (payload: string) => void | Called with encoded payload after verification |
onServerVerification | (result: any) => void | Called with server verification result |
delay | number | Optional delay before solving (ms) |
debug | boolean | Enable verbose logging |
hideLogo | boolean | Hide the ALTCHA logo |
hideFooter | boolean | Hide the footer text |
httpHeaders | Record<string,string> | Custom HTTP headers (optional) |
themes | { dark: {}, light: {} } | Override theme properties |
customTranslations | Record<string,Translation> | Override default translations |
verifyUrl | string | Server endpoint to verify the solution |
The component includes built-in translations for multiple languages.
You can pass a customTranslations prop to override or add custom text.
<AltchaWidget
challengeUrl="https://api.example.com/altcha/challenge"
locale="en"
customTranslations={{
en: {
label: 'I am human',
},
}}
/>
You can customize the widget’s appearance using the style prop for layout and basic styling:
<AltchaWidget
style={{
backgroundColor: '#ddd',
borderColor: '#0000ff',
fontSize: 20,
width: '100%',
}}
/>
For color customization, use the themes prop to define separate color sets for light and dark modes:
<AltchaWidget
themes={{
dark: {
primaryColor: '#00ff00',
},
light: {
primaryColor: '#00ff00',
},
}}
/>
Available theme colors:
type AltchaTheme = {
backgroundColor: string;
borderColor: string;
errorColor: string;
primaryColor: string;
primaryContentColor: string;
textColor: string;
};
cd example
yarn install
yarn start
MIT
FAQs
altcha
The npm package react-native-altcha receives a total of 255 weekly downloads. As such, react-native-altcha popularity was classified as not popular.
We found that react-native-altcha demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.