My place in the WordPress community
- I have had a wordpress.org account since 2006.
- I contributed to WordPress core for versions 7.0 and 7.1.
- I maintain 30 plugins on wordpress.org.
- I organise and speak at WordCamps.
- I have attended every WordCamp Europe from 2017 to 2026.
- Local WordPress meetup: WordPress Barcelona
A Catalan public procedure that needs to know who the citizen is usually does not build its own login. It connects to the identification platform of the Consorci AOC, called VALid. I am Mariusz Szatkowski, a Gdynia developer, and I work with clients by email and documents. This page covers what the AOC publishes about VALid and how a Next.js application should be built around it. It also says plainly where the public pages stop.

Plaça de Sant Jaume in Barcelona, between the Palau de la Generalitat and the city hall, shot by Herodotptlomeu and shared under CC BY-SA 4.0 on Wikimedia Commons.
What is VALid?
The AOC service page describes VALid as “l’integrador de serveis d’identitat digital de Catalunya”, so that citizens have every option to complete a procedure easily. The listed features are:
- Identification: an integration bus of identification systems for citizens of the Catalan public administrations
- Access to idCAT Mobil: integration opens the application to this mechanism, which sends one-time passwords to the user’s mobile phone
- Signature: once a user is identified, the user can link the identity to a document, which produces a non-cryptographic electronic signature
- Qualified signature: where it applies, signing based on qualified certificates
- Validator: a web service that validates qualified certificates and electronic signatures
- Centralised signer: custody of qualified electronic seal certificates assigned exclusively to the integrated applications
The page promises that an application does not need to develop and maintain identification systems of its own. The idCAT page shows idCAT as a separate service, with certificate and idCAT Mobil variants, and lists VALid as a complement.
How does an organisation request VALid?
The AOC support article lays out the steps:
- In EACAT, open the catalogue entry “Servei AOC - Sol-licitud de serveis” and the procedure for registering and changing AOC services.
- Download the PDF form from the requesting organisation, where the EACAT user manager must have granted the right permissions.
- Select the VALid service in the form, sign it electronically, and send it through the form’s own button or through the EACAT registry window.
If the organisation is a department of the Generalitat or depends on one, or if it is already enrolled, it does not request enrolment. It requests the integration of a new application instead.
For a supplier, the consequence is practical. The enrolment belongs to the administration, not to the developer. A Next.js project for a Catalan body starts with a question to that body: is it enrolled, and who at the organisation requests the integration of the new application?
What do the public pages not tell me?
They do not name the protocol, the entity identifiers, the return URL rules or the attributes that come back after identification. The service page says only that integration is based on messaging built on widely adopted international standards. I looked for technical documentation on the public AOC pages and the support article and did not find it there. It is delivered by the AOC support centre to the enrolled organisation, so I do not describe a flow I cannot read. If a page claims to show the exact VALid message format without citing the AOC, treat it with caution.
What I can describe with sources is the part that lives on your side.
How should the Next.js app handle the session?
Whatever VALid returns, the app must turn it into its own session. The Next.js authentication guide separates three jobs: authentication, session management and authorization. VALid covers the first. The other two stay in your code.
- Create the session on the server. The guide says cookies should be set on the server, with
HttpOnly,Secure,SameSite, an expiry and a path. Use thecookiesAPI in a Route Handler or Server Action after the identification result is verified. - Keep the payload minimal. The guide says the session payload should hold the minimum data, such as an ID or role, and not personal data like phone numbers or email addresses. For a citizen procedure, that means an internal reference, not the identity attributes.
- Verify close to the data. The guide recommends a Data Access Layer with a
verifySession()function, and says Proxy checks are optimistic only and must not be the sole defence. - Re-check inside every Server Action. The guide says to treat Server Actions and Route Handlers like public API endpoints.
// app/lib/dal.ts
import 'server-only'
import { cache } from 'react'
import { cookies } from 'next/headers'
import { redirect } from 'next/navigation'
import { decrypt } from '@/app/lib/session'
export const verifySession = cache(async () => {
const cookie = (await cookies()).get('session')?.value
const session = await decrypt(cookie)
if (!session?.caseRef) redirect('/identify')
return { caseRef: session.caseRef }
})The one function missing from this sketch is the one that checks the VALid result. Its body comes from the AOC documentation, and I keep it behind a small adapter, so that the rest of the app never sees the platform’s message format.
What do I build around the identification step?
- an adapter module with one function in and one out, so a change of the platform contract touches one file
- a test double of the adapter, so the procedure can be tested without a live identification
- a clear failure page for a cancelled or expired identification, with a way to start again
- a log line that records the outcome and a case reference, but not the identity attributes
- an accessibility pass on the screens before and after the redirect, since the citizen should not be stuck on an unlabelled screen
How does a project run?
Everything stays in writing. The first step is a short written list of the questions for the AOC and for the administration: enrolment status, the integration request, the test environment and the attributes the procedure needs. Then I build the adapter, the session layer and the procedure screens, with the AOC contract slotted in once it is available. The wider Next.js scope, beyond the identification step, is described on the Next.js developer page.
Send me your procedure
If your Barcelona body or its supplier plans a citizen procedure in Next.js, send the procedure name, the enrolment status in EACAT and the deadline through the contact form. The first written estimate for the identification step is free. The enrolment itself stays with the administration, and I am not a lawyer, so questions on the legal value of the signature go to the organisation’s own legal team.
Selected projects
Examples of my work.
E-commerce Development: estel-poland.com
estel-poland.com is a professional online store for cosmetics, created for customers seeking high-quality skincare and makeup products. The platform is desig...
E-commerce Development: gdasj.pl
gdasj.pl is a local website from Gdansk, built for simple publishing, good performance, and clear access to content.
E-commerce Development: gidpl.ru
Since March 25, 2013, the GIDpl.ru portal has continuously informed users about the most important cultural and sports events as well as tourist and commerci...
WordPress support & development in Barcelona
Need this service: Next.js developer in Barcelona?
Describe your project by e-mail. I reply within 24 hours.
Describe your projectExplore other WordPress services and knowledge base
Migration to Astro, Next.js, and headless WordPress.
WooCommerce sync with ERP and wholesale systems.
Business process automation around WordPress and company systems.
Library of concrete automation use cases.
Headless WordPress, Sanity, Strapi, and Contentful with Astro or Next.js.
Astro, MDX, edge delivery, and Core Web Vitals measured on real traffic.
Custom WordPress engineering and architecture.
Scalable headless, ERP, and AI architecture for enterprise.
Related categories
Supporting articles

Six to sixteen weeks for typical engagements, with a four-phase shape: discovery, scoping, build and cutover, tuning. The variables are catalogue size, integration count, URL preservation, and editorial team readiness, not framework choice.

A definitive 4-year Total Cost of Ownership (TCO) analysis, real-world Core Web Vitals benchmarks, Astro 7 GraphQL APQ architecture, and a 10-point executive decision matrix for choosing between decoupled and traditional WordPress.

The Shopify Plus vs WooCommerce headless decision in 2026 is no longer a binary "platform vs custom" trade-off. Both can run headless, both integrate AI, both ship at the edge. The real axes are control, total cost over five years, and exit strategy. This article walks the matrix with confirmed platform facts.