Skip to main content

2 posts tagged with "security"

View All Tags

Integrating Laravel Captcha into Laravel + React / Next.js

· 23 min read
Mohamed El Amine Meghni
Mohamed El Amine Meghni
Software & DevOps Engineer

Most captcha integrations get bolted onto a login form, annoy every real user forever, and stop the attacker they were meant to stop for about as long as it takes someone to point an AI model at the image.

gts-meghni/laravel-captcha is built around that fact instead of ignoring it. It ships two separate defences that stop two different kinds of attacker, and it expects you to run the invisible one everywhere and the visible one only when a caller has earned it.

This post is in two halves. Part one is the backend, from installing the package to deciding when an image gets demanded. Part two is the frontend, in React, Next.js and Inertia. The two are joined by a small JSON contract, written out at the end of part one, so you can build either side on its own and read only the half you need.

Secure Bearer Token Storage in Practice

· 10 min read
Mohamed El Amine Meghni
Mohamed El Amine Meghni
Software & DevOps Engineer

For developers at Sadeem informatique

Most articles explain where to store tokens. This guide shows you exactly how to implement a secure setup in a real web application.

We'll build the modern recommended pattern:

TokenStorageLifetime
Access tokenIn-memory only (encrypted JWT)15 minutes
Refresh tokenHTTP-only encrypted cookie7 days

This approach aligns with OWASP security guidance and is widely used in production SaaS applications.

Laptop displaying a lock icon representing secure token and authentication practices

Photo by Dan Nelson on Pexels.