Next.js developer in Ostrava

Next.js for businesses in Ostrava, delivered remotely by one developer.

Next.js developer

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 Ostrava

My WordPress.org profile

A Czech web application that has to verify a citizen does not collect documents or passwords. It connects to the National Identity Authority, in Czech Národní identitní autorita (NIA), and receives a verified identity from the citizen’s chosen identity provider. I am Mariusz Szatkowski, an independent developer working from Gdynia, and the Next.js side of that connection is the part I build.

Blast furnace structures in Dolní Vítkovice, Ostrava

Industrial structures in the Dolní Vítkovice area of Ostrava. Photo: Kubajdaa22cz, licence CC BY-SA 4.0, file page on Wikimedia Commons.

The facts below come from the official NIA portal and its handbook for qualified service providers, version 1.30 of 20 May 2026. Several websites with similar names are magazines and say so themselves; the state portals are identita.gov.cz and info.identita.gov.cz. I am not a lawyer. Whether your organisation may use NIA is decided by the law that governs your agenda and by the agency.

#Who may connect to NIA?

The handbook calls a connecting application a qualified service provider, in Czech kvalifikovaný poskytovatel, defined under Act No. 250/2017 Coll. on electronic identification. The portal registration is done by someone who logs in through the data box information system. The handbook states this is not possible through Citizen Identity itself.

For a company the rule is strict. Only private entities that a legal rule obliges to verify identity with electronic identification can be connected to the production environment. The company sends the Digital and Information Agency a data message titled “Request for connection to the production environment of NIA”. The handbook lists what the request must contain at minimum:

  • a clear identification of the company,
  • the online service that needs NIA,
  • the legal provision that creates the duty to verify identity,
  • the required level of assurance of the identification means.

If no defects are found, the agency contacts the applicant about testing and the technical connection. The portal itself registers an organisation only when it is a public authority. For any other organisation it shows how to register directly with the agency.

So the first deliverable is a paper one. Without the legal basis there is no production login, and I will not write integration code that assumes it.

#How do I get a test environment?

A private company that wants to develop its own solution sends a separate message titled “Request for connection to the test environment of NIA” to the agency’s data box. The handbook asks for the entity or group of entities the service is developed for, a description of the service, and an email and phone contact of the person responsible for testing.

The test environment has an internal identity provider called Test profiles. The handbook says you pick a preset profile and need no credentials. That makes automated and manual testing practical, because a developer can log in as several citizens without owning an eID card.

#Which protocols and addresses does NIA offer?

The handbook lists three standards for a provider: WS-Federation, SAML 2 with eIDAS, and OpenID Connect. For a Next.js application I would choose OpenID Connect, which returns JSON Web Tokens and fits a Route Handler. The addresses in the handbook are:

PurposeTestProduction
Authorizehttps://tnia.identita.gov.cz/fpsts/oidc/authorizehttps://nia.identita.gov.cz/fpsts/oidc/authorize
Tokenhttps://tnia.identita.gov.cz/fpsts/oidc/tokenhttps://nia.identita.gov.cz/fpsts/oidc/token
End sessionhttps://tnia.identita.gov.cz/fpsts/oidc/endsessionhttps://nia.identita.gov.cz/fpsts/oidc/endsession
Revokehttps://tnia.identita.gov.cz/fpsts/oidc/revokehttps://nia.identita.gov.cz/fpsts/oidc/revoke

The handbook points to a developer wiki for OIDC details, hosted on Azure DevOps. I could not read it, so I state nothing here about PKCE, client authentication or token claims. Read the wiki before you finalise the code, and treat any library default as unverified until it has been tested against the test environment.

#What does the level of assurance change?

Each request must state the required level of assurance. The handbook says NIA filters the list of identity providers by that level. The eIDAS levels are low, substantial and high. A request with a missing or wrong value still completes, but the citizen may see a different set of providers than you expect. Through the international eIDAS gateway such a call fails instead.

In OpenID Connect the handbook says NIA accepts the level in two ways: as a value in the scope parameter, or through the Authentication Context Class Reference parameter acr. A provider can ask for a minimum level or a specific one.

Pick the level per screen, not once per application. An account overview and a legally binding submission rarely need the same assurance.

#Which values must match the registration?

The registered identifier of your provider must be sent in every request. For OpenID Connect that is client_id. If it is missing or wrong, NIA treats the request as invalid and shows an error about an untrusted service provider. The return address is similar: the handbook says that if the request names a return URL, it must match the registered one, otherwise token issuing stops with an error.

In Next.js that means the redirect URI is an environment value per deployment. A preview deployment with a random URL will not work with a registered address, so test on one stable test hostname.

#What data and which identifier do I get?

NIA does not hand out a national number as a login key. The handbook describes pseudonyms: the service provider receives a service provider pseudonym, a meaningless directional identifier, and the attributes collected from the basic registers and other sources named in the request. Providers placed in the same issuing group receive the same pseudonym for the same citizen, and a provider can be moved between groups in the portal.

The handbook’s attribute table includes PersonIdentifier for the pseudonym, PhoneNumber, TRadresaID for the residence address as RUIAN codes, IdType, IdNumber and FullIds for documents, plus address, e-mail, age and age-over attributes. It also says NIA always checks the register for a death record, and if the person is marked as deceased the whole identification ends as invalid.

Store the pseudonym as the user key. Request only the attributes your agenda needs, and keep them out of client components. The Next.js authentication guide says a session payload should hold the minimum unique data, such as an ID, and not personal data like a phone number.

#What does the Next.js side look like?

A login Route Handler builds the authorize URL from the registered values and redirects. A callback Route Handler exchanges the code at the token endpoint, validates the token, and creates the session. The session itself follows the Next.js guide: a server-set cookie with HttpOnly, Secure, SameSite and an expiry, a Data Access Layer whose verifySession() runs before every data request, and the Proxy file for optimistic checks only.

The one part the handbook makes mandatory is logout:

// app/logout/route.ts (sketch)
import { NextResponse } from 'next/server'
import { deleteSession } from '@/app/lib/session'

const NIA = process.env.NIA_BASE_URL // tnia... for test, nia... for production

export async function POST() {
  await deleteSession()
  return NextResponse.redirect(`${NIA}/fpsts/oidc/endsession`, 303)
}

The handbook explains why. NIA works as single sign-on. If a citizen logged in to another provider first, a new visit to your site can authenticate them silently, so ending your own session proves nothing. The text says it is unconditionally necessary to implement logout and to send the logout request to NIA as well. The handbook gives the endsession address but not its parameters, so add them from the wiki.

#What should the team confirm before coding?

  • The legal provision that obliges your agenda to verify identity, in writing.
  • Both data messages to the agency, for testing and for production.
  • The wiki for OIDC parameters, token validation and client authentication.
  • The level of assurance for each protected screen.
  • Which attributes the agenda is entitled to, and which you will not store.
  • A stable test hostname for the registered return address.
  • The logout request to NIA, tested with two applications in one browser.

#What I deliver for an Ostrava team

I build the login, callback, session and logout flow in strict TypeScript, the screens around them, and a test plan that runs against the Test profiles identity provider. At handover you get the repository and a runbook listing every registered value and environment variable. The legal basis and the agency correspondence stay with your organisation, and I work from the documents you receive.

If an Ostrava project needs this connection, send the scope through the contact page. The first written estimate is free, and the Next.js developer page describes the broader work. Decisions stay in email and shared documents.

See also in Czech Republic

Need this service: Next.js developer in Ostrava?

Describe your project by e-mail. I reply within 24 hours.

Describe your project

Explore other WordPress services and knowledge base