PHPackages                             webdevartisan/laravel-altcha - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. webdevartisan/laravel-altcha

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

webdevartisan/laravel-altcha
============================

A Laravel server implementation for Altcha.

0119[3 PRs](https://github.com/webdevartisan/laravel-altcha/pulls)PHPCI passing

Since Oct 13Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/webdevartisan/laravel-altcha)[ Packagist](https://packagist.org/packages/webdevartisan/laravel-altcha)[ RSS](/packages/webdevartisan-laravel-altcha/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (4)Used By (0)

Laravel Altcha.
===============

[](#laravel-altcha)

[![Latest Version on Packagist](https://camo.githubusercontent.com/56628881b6f7722d4e0d0c9e306b2430497619ccdedb1775f4abd8fdebafa529/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6772616e74686f6c6c652f6c61726176656c2d616c746368612e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/grantholle/laravel-altcha)[![GitHub Tests Action Status](https://camo.githubusercontent.com/441818ebd793f316d8936787ba2fcb8f30f431b78a1b6f64f8a45aa52a386b9c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6772616e74686f6c6c652f6c61726176656c2d616c746368612f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/grantholle/laravel-altcha/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/6872bad803673e0917d0356b9d3852f80f33beaaad3b69fd7d5e314619e09d86/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6772616e74686f6c6c652f6c61726176656c2d616c746368612f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/grantholle/laravel-altcha/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/b60dc4e079bd4a7263044792ce7c76c9724f4871d943f063ec1d3e0020ed4a98/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6772616e74686f6c6c652f6c61726176656c2d616c746368612e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/grantholle/laravel-altcha)

This is a Laravel implementation for the server-side of [Altcha](https://altcha.org/), a proof-of-work captcha that does not require any third-party service.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require grantholle/laravel-altcha
```

Optionally, publish the config file with:

```
php artisan vendor:publish --tag="altcha-config"
```

Usage
-----

[](#usage)

In `.env` (or published config file), set the following variables:

```
# Required, sort of like a password
ALTCHA_HMAC_KEY=
# Optional, defaults to SHA-256. Can be SHA-384 or SHA-512
# ALTCHA_ALGORITHM="SHA-256"
```

Out of the box, the package registers a `/altcha-challenge` endpoint to use you on your frontend.

Frontend
--------

[](#frontend)

Following the [frontend integration](https://altcha.org/docs/website-integration), use the following snippet to get a challenge:

```

```

Implementation will be different given your frontend, but here's an example Vue component to use:

```

import 'altcha'

const emit = defineEmits(['update:modelValue'])
const stateChanged = ev => {
  if (ev.detail.state === 'verified') {
    emit('update:modelValue', ev.detail.payload)
  }
}

```

In an Inertja.js form, you could use this component like so:

```

    Email

    Password

    Submit

import { useForm } from '@inertiajs/inertia-vue3'
// This is the component we made above
import Altcha from '@/components/forms/Altcha.vue'

const form = useForm({
  email: null,
  password: null,
  token: null,
})

```

Backend validation
------------------

[](#backend-validation)

To validate the frontend-generated token/payload, there's a `ValidAltcha` rule you can use, assuming the token is passed as `token` in the request:

```
use GrantHolle\Altcha\Rules\ValidAltcha;

$request->validate([
    'email' => ['required', 'email'],
    'password' => ['required'],
    'altcha' => ['required', new ValidAltcha()],
]);
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Grant Holle](https://github.com/grantholle)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance60

Regular maintenance activity

Popularity10

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity17

Early-stage or recently created project

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/701afa0a0dc825d49d4111a85a0e22189df18220622525c2107745f634b48d67?d=identicon)[webdevartisan](/maintainers/webdevartisan)

---

Top Contributors

[![grantholle](https://avatars.githubusercontent.com/u/1189456?v=4)](https://github.com/grantholle "grantholle (16 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (8 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (7 commits)")[![webdevartisan](https://avatars.githubusercontent.com/u/160753900?v=4)](https://github.com/webdevartisan "webdevartisan (2 commits)")[![mattstein](https://avatars.githubusercontent.com/u/2488775?v=4)](https://github.com/mattstein "mattstein (1 commits)")

### Embed Badge

![Health badge](/badges/webdevartisan-laravel-altcha/health.svg)

```
[![Health](https://phpackages.com/badges/webdevartisan-laravel-altcha/health.svg)](https://phpackages.com/packages/webdevartisan-laravel-altcha)
```

###  Alternatives

[thedigitalembassy/adeptus

Wordpress activity log plugin

105.2k](/packages/thedigitalembassy-adeptus)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
