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.
Cl@ve is the identification platform of the Spanish public administrations, and the official sources are specific about who connects to it and how. I am Mariusz Szatkowski, a freelance developer in Gdynia, and I work with Spanish clients by email and shared documents only. The interface is either my design or yours, implemented in Next.js. I am not a lawyer, and whether your organisation may connect is decided by the Spanish administration, not by the developer.

The Palau de la Generalitat in Valencia, photographed by Anual (CC BY 3.0), via Wikimedia Commons.
The facts below come from the Spanish public administration portal (administracionelectronica.gob.es) and from clave.gob.es. I read them in Spanish on 4 December 2026. The integration kit and the full technical documents sit in an area for registered public administrations, and I could not read them. Everything about message formats beyond what the public pages say is therefore marked as open.
What is Cl@ve?
The portal describes Cl@ve Identificacion as the common platform of the state public administrative sector for electronic identification and authentication with agreed keys, open to use by all public administrations. A citizen uses one set of credentials across services instead of one per administration. The platform complements the electronic DNI and electronic certificates and is, in the portal’s words, interoperable and horizontal, so administrations do not have to build and run their own identification systems.
For citizens, clave.gob.es names two ways in after registration. Cl@ve Movil identifies the person by scanning a QR code or confirming a request that arrives on the phone. Cl@ve Permanente is a long-lived password for regular use and for cloud signing. The FAQ adds that Cl@ve Permanente has a normal and a reinforced mode, and the reinforced mode adds a one-time code received on the phone for services that need a higher security level.
The rules behind it are the Orden PRE/1838/2014 of 8 October, which publishes the Council of Ministers agreement approving Cl@ve, and the Resolution of 14 December 2015 of the Direccion de Tecnologias de la Informacion y las Comunicaciones on the technical prescriptions, published as BOE-A-2015-14215.
Who may connect a Next.js application?
This is the question the sources answer first, and the answer narrows the market for a developer.
- The portal lists the recipients of the solution as any public administration, and the managing bodies as the Ministry for Digital Transformation and Public Function through the Secretaria General de Administracion Digital.
- The support contact, the CAID (Centro de Atencion a Integradores y Desarrolladores), is stated to be accessible only for developers of applications of public administrations.
- The downloads page carries a notice: bodies that do not belong to the state public sector need a signed collaboration agreement with the Secretaria General de Administracion Digital to access the platform. The notice points to the list of agreements in force on the same portal.
I found nothing in these pages that describes a route for a purely private company, such as an online shop, to become a service provider. The question can be put to the support centre by the organisation concerned. Until the administration answers, I do not plan a project on the assumption that a private shop can connect. The realistic cases for a Next.js front end are applications of a public body: a municipality, a public agency, a university or a public service portal that has or can get the agreement.
How does the integration work?
The additional information page describes the architecture. Cl@ve is a federation of identities with three kinds of parts: service providers (the administration applications), identity providers that supply the identification mechanisms, and a gateway that sits between them. A service provider integrates only with the gateway, and the gateway holds the relations with the identity providers.
The flow, as the page states it:
- The citizen opens an e-administration service that is integrated with Cl@ve and needs identification.
- The citizen is redirected to Cl@ve and sees a screen to choose the identification method. The active options depend on the parameters the service provider sent about permitted identity providers and QAA levels.
- The citizen selects a method and is redirected to the matching identity provider.
- The citizen authenticates there and is redirected back to Cl@ve.
- Without any further interaction the citizen is redirected back to the service provider.
All communication runs through tokens that pass through the citizen’s browser, so the service provider never talks to an identity provider directly. Every token is signed by its issuer, and trust depends on the signing certificates of both sides being trusted. Each identification system carries a quality indicator, the QAA level, and the application picks the set of systems it permits based on it.
On the technical description the page is explicit: the connection is not through web services but through SAML assertions in the browser, and Cl@ve uses the SAML 2.0 profile defined by STORK. Service providers must be able to create SAML tokens, and an integration package with a SAML engine is supplied for this. The catalogue entry lists Java J2EE and Linux for the solution.
A note from the portal on the later version: Cl@ve 2, the node that connects to eIDAS, requires a new integration, because the SAML messages of eIDAS differ from the STORK-based messages of Cl@ve 1. That news item is dated 2018, and the roadmap page speaks of the end of Cl@ve 1 support, so a new project targets Cl@ve 2.
How does onboarding work?
The downloads page describes the steps for Cl@ve 2:
- a document on registering as a service provider, and a request form for registrations, changes and cancellations;
- a form with the data for SMS billing, which has to be attached to the request;
- the support centre registers the service provider and the person named as technical contact in the Cl@ve 2 administration application, and that person can then register further users and the certificates used to validate the signatures of the SAML tokens sent to the gateway.
The page also lists the legal instrument for consumption of the service, the security levels document (Cl@ve Niveles de Seguridad, version 2.0) and the conditions for acting as a registration office. A project plan starts with these documents and with the agreement question above, long before code.
What would a Next.js application have to provide?
The sources fix the protocol, so the Next.js design follows from them. This part is my design reasoning and not a statement of the official documentation.
The Next.js documentation describes Route Handlers: route.ts files that export functions named after HTTP methods and work with the Web Request and Response APIs. A SAML flow needs two endpoints in the application. One builds a signed authentication request and redirects the browser to the gateway, and one receives the response from the gateway through the browser. Which HTTP method and binding the gateway uses for the response is defined in the integration kit, which I could not read, so I do not assume it. The Route Handler documentation lists the supported methods as GET, POST, PUT, PATCH, DELETE, HEAD and OPTIONS, so either direction can be received.
Three decisions follow:
- SAML library or separate service. The kit is a Java package. A Next.js application on Node needs a SAML implementation that creates and validates signed messages for the profile the kit defines. The alternative is a small Java service next to the Next.js application that runs the official kit and hands the verified identity to Next.js over an internal call. The second option keeps the official package in use and is easier to compare with the support centre’s expectations. Which of the two the administration accepts is a question for the CAID.
- Certificates. The service provider’s signing certificate is registered in the administration application, and the private key stays on the server, outside the repository and outside client bundles.
- Session. After validation, the application creates its own session. The Next.js authentication guide describes stateless sessions in a cookie and database sessions with an encrypted identifier in the cookie, with the cookie options httpOnly, secure, sameSite and path, and recommends a Data Access Layer for authorisation checks. A public-sector application with identity data is a candidate for the database variant.
What identity data the response carries and which attributes a service provider receives is defined in documents I could not read. I list that as open, not as a guess.
What about the QAA level?
Cl@ve lets the application state the assurance level it wants for the data it handles. The user then picks among the methods that reach that level. The FAQ explains the effect for the citizen: some methods are greyed out when the service needs a higher level than they provide, for example when the service handles specially protected personal data. In a Next.js interface that means the application must not assume that every method is available, and the text around the Cl@ve button should not promise a specific one. The level is a product decision with the data owner of the administration, and the security levels document is the reference.
How does a project run?
- You send the body that runs the application, whether an agreement with the Secretaria General de Administracion Digital exists, the Next.js version, and the identity data the service needs. A reply by email follows within a working day.
- I write down the scope and open questions for the support centre, including SAML library versus Java service and the integration kit contents.
- I build against the test environment the administration grants, on a staging copy. You test with the credentials the administration provides.
- After your written acceptance and the administration’s go-ahead, I release.
For the framework side in general, see the Next.js developer page.
Check eligibility before any code
If you run a public service in the Valencia region and need Cl@ve login in a Next.js application, send the name of the body, the agreement status and the data the service needs through the contact form. Asking for a first written estimate carries no fee. Whether your organisation may connect is for the Spanish administration to decide.
Selected projects
Examples of my work.
Vector Solutions - Telecommunications Technology Pioneer
Vector Solutions is a company recognized in Poland and throughout Europe as a pioneer in the technology sector, transforming modern communication with innovative solutions for cable operators and telecommunications companies.
Victim Assistance Office - odszkodowania.pl
The Victim Assistance Office website was designed to provide professional and empathetic information to support people in difficult life situations. The site...
Website Delivery: Sole Practitioner Law Firm
Technical implementation for a sole practitioner law firm in Wroclaw: WordPress migration, SSL certificate, mail server configuration, and pre-launch QA.
WordPress support & development in Valencia
Need this service: Next.js developer in Valencia?
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.