How to display the current and parent category in WordPress
Need to show the category hierarchy in your theme? Learn how to get the current category and its parent using get_the_category() and get_category_parents().
FranceConnect is the French state’s login button: a user signs in to your application with an account at an identity provider they already use. I am Mariusz Szatkowski, a developer in Gdynia who works remotely and in writing, with WordPress since 2006 and PHP applications beside it. I design the screens or implement your design. For FranceConnect the partner process and the legal basis are yours to settle, and I build the PHP side.

Place de la Bourse in Bordeaux, seen from the Garonne side. Taken in June 2009 by Coyau, licensed CC BY-SA 3.0 via Wikimedia Commons.
The partner documentation home page describes secure access without a separate login, verified identity data and API access. It reports more than 40 million active users and more than 1,500 active services. It names three partner types: service providers (the application that shows the button), identity providers (the organisations that authenticate the user) and data providers.
A PHP application is a service provider. The documentation splits the product in two. FranceConnect works at eIDAS level 1. FranceConnect+ works at levels 2 and 3, and the DataPass guidance says to use it for sensitive procedures. Private-sector organisations that choose FranceConnect+ may face billing by some identity providers, according to the same page.
Not automatically. The documentation points to article 4 of the arrete of 8 November 2018. Any administration or public body can set up the button. Associations and private companies can do so in two cases: online services tied to the change-of-address procedure, and services whose use requires, under a regulation, verification of the user’s identity.
In both cases the organisation must name a legal duty in a law or regulation that explicitly obliges it to verify the identity of the users of its own services. A duty that covers only its customers does not suffice. The documentation gives a bank as an example: its customer-vigilance duty under article L. 561-5 of the monetary and financial code, within the strict frame of that article. Eligibility is checked when the request is reviewed.
For a developer, this decides the project before any code. An online shop without such a duty cannot count on FranceConnect. I am not a lawyer, so the legal reading belongs with your adviser.
The pages under “Devenir fournisseur de service” list the steps: eligibility, the choice between FranceConnect and FranceConnect+, the DataPass request, partner space access, a service name, the sandbox, qualification and production.
DataPass. The request is filed in DataPass, the DINUM tool, with ProConnect authentication and a professional email address. The form names four contacts:
The form also asks for the project description, the expected go-live date (informational only), an approximate annual volume, the recipients of the data and a retention period, where a maximum of 36 months is generally indicated. The requested data come from a fixed list: family name, given names, birth date, birth city, birth country and sex, plus optionally usage name and email. A technical identifier specific to the service is always provided, and the page says to select only the data you need.
Three attestations close the form: terms of use accepted, the data protection officer informed, and an alternative to FranceConnect at the same guarantee level. The FranceConnect team usually replies by email within a few days. A detailed legal analysis can take several weeks.
Sandbox. The partner space manages sandbox access. You can create several instances, name them (for example development and qualification), set the login and logout redirect URLs, the outgoing IP addresses and the signature algorithm, ES256 recommended or RS256. The page says the partner space currently manages only the FranceConnect sandbox. FranceConnect+ sandbox access goes through a separate form.
Qualification. The FranceConnect team must validate the integration before production use. It checks 24 criteria in three groups: visual (1 to 7), technical (8 to 12) and service (13 to 24). Any failed criterion triggers a request for corrections. The page recommends an internal test of every criterion before submitting.
The endpoints page lists these paths for FranceConnect and FranceConnect+. It gives only integration and sandbox hosts, no production host, so read the production base address from your onboarding mail and keep it in configuration.
| Endpoint | Path | What the page says |
|---|---|---|
| Discovery | GET /api/v2/.well-known/openid-configuration | JSON document, no parameters |
| JWKS | GET /api/v2/jwks | The signing keys in use |
| Authorize | GET or POST /api/v2/authorize | acr_values, state and nonce; a 303 on success or login error, 400 on a bad format |
| Token | POST /api/v2/token | Form-encoded, grant_type authorization_code and the client secret; returns access_token, id_token, scope, expires_in |
| UserInfo | GET /api/v2/userinfo | Bearer access token; the answer is a JWT, signed on FranceConnect, encrypted on FranceConnect+ |
| Logout | GET /api/v2/session/end | A browser redirect with id_token_hint, state and post_logout_redirect_uri |
On FranceConnect+ the ID token is encrypted, so the code decrypts it before reading claims and before using it as the logout hint.
The qualification criteria require state and nonce values of at least 22 random, unique characters, and tampering with them must make the login fail. The endpoints page asks for at least 32 characters on a POST authorize call and 22 on GET. The manual describes random_bytes() as suitable for all applications, including long-term secrets, so 32 random bytes in hexadecimal give 64 characters and satisfy both limits.
<?php
declare(strict_types=1);
session_start();
$_SESSION['fc_state'] = bin2hex(random_bytes(32));
$_SESSION['fc_nonce'] = bin2hex(random_bytes(32));
$url = getenv('FC_BASE_URL') . '/api/v2/authorize?' . http_build_query([
'response_type' => 'code',
'client_id' => getenv('FC_CLIENT_ID'),
'redirect_uri' => getenv('FC_REDIRECT_URI'),
'scope' => 'openid given_name family_name',
'acr_values' => 'eidas1',
'state' => $_SESSION['fc_state'],
'nonce' => $_SESSION['fc_nonce'],
]);
header('Location: ' . $url, true, 303);On the callback the code compares the returned state with the stored one. The manual says hash_equals() runs in time that does not depend on where the strings differ, and that the user-supplied string goes second. After a successful login the code replaces the session identifier with session_regenerate_id(), which keeps the session data under a new identifier.
<?php
$given = (string) ($_GET['state'] ?? '');
if (!hash_equals($_SESSION['fc_state'] ?? '', $given)) {
http_response_code(400);
exit;
}
// exchange the code at once, then verify the ID token:
// signature against the JWKS, nonce equals $_SESSION['fc_nonce']
session_regenerate_id();The nonce is checked inside the ID token, not in the query string. The ID token also carries the acr claim, covered next.
On FranceConnect the only valid value is eidas1, and it is mandatory. On FranceConnect+ the values are eidas2 (substantial) and eidas3 (high). Sending eidas1 to FranceConnect+ returns an error, and any value outside the three is ignored. If acr_values is omitted on FranceConnect+, the platform uses the highest level it supports. When a level is requested, users see only identity providers that can meet it.
The code reads the achieved level from the acr claim and verifies that it matches what it expects. A higher level than requested is acceptable: if the service asked for eidas2, it must also accept eidas3.
The amr claim is separate. It is not returned by default. The service adds a claims parameter to the authorize request, set to the JSON below and URL-encoded, and then reads the methods the user used (pwd, pop, mfa, pin, mail). The page says mfa appears only when the methods meet the definition of multi-factor authentication, and that even with mfa the assurance level of the identity stays low.
{"id_token":{"amr":{"essential":true}}}The documentation lists scopes such as given_name, family_name, birthdate, gender, birthplace, birthcountry, email, preferred_username and the bundle identite_pivot. The claims returned depend on the scopes in the access token, and a provider can consult only the scopes granted in its DataPass habilitation. The authentication claims (amr, acr, sid, auth_time, iss) appear only in the ID token. The qualification check says the requested scopes must be no broader than the approved ones.
Two choices follow for the database.
sector_identifier_url exists. That file must be reachable over HTTPS without authentication, served as application/json and hold a JSON array of the redirect URIs. It does not replace registering every URI in the partner space.Qualification also expects the pivot identity fields to be locked in the user profile and the other fields to stay editable. In PHP this means separate form handling for the fields that came from the identity provider, not a single profile form.
The session lifetimes page gives these values.
| Item | Lifetime |
|---|---|
| Authorization code | 30 seconds |
| Access token | 60 seconds |
| User consent | 5 seconds |
| FranceConnect+ web session | 30 minutes of inactivity |
The consequence is plain: the callback handler exchanges the code and calls userinfo within the same request, and does not queue the exchange in a background job. A slow database write between the redirect and the token call can push the exchange past 30 seconds.
The logout page describes a front-channel mechanism based on a draft OpenID Connect specification that is still being specified. The service must log the user out of its own application, log the user out of the FranceConnect session, and send the user to a return page. All logout redirect URLs must be registered in the client parameters, which is mandatory.
The request is a redirect in the user’s browser to the logout endpoint with id_token_hint (the ID token received at login, decrypted first on FranceConnect+) and post_logout_redirect_uri. Revoking the access token under RFC 7009 is optional.
The documentation adds that FranceConnect offers single sign-on, so a user can reconnect without authenticating again with the identity provider, and that closing the browser does not log the user out of FranceConnect. FranceConnect+ does log the user out in that case, and only high-level connections require re-authentication. Qualification also covers logout when an account is deleted or unlinked.
The technical group asks for TLS 1.2 or 1.3 only, scopes no broader than approved, the eIDAS level in acr_values with the returned level verified, a consistent client_id, and state and nonce of at least 22 random characters. The service group includes the login flow, logout parameters, the registration flow, account reconciliation tests if implemented, a visible user identity, no pop-ups or iframes, a required notice about local passwords, and error handling on the redirect URI. The visual group fixes the button size (209 by 56 pixels for FranceConnect, 245 by 56 for FranceConnect+), its position as the first login option and a visible separator with “OU”.
Each of these is testable in a staging copy before the request goes in.
random_bytes(), compare state with hash_equals().Beyond login, the PHP developer page describes the applications I build.
If your Bordeaux organisation has a legal basis for FranceConnect and a PHP application to connect, describe the application, the framework and the assurance level through the contact form. The first written estimate for the login build is free. The legal basis, the DataPass answers and the choice of assurance level stay with you and your adviser.
Examples of my work.
surfuje.pl is a website for surfers and watersports enthusiasts, with clear content, simple publishing, and stable technical operation.
zamki-szkocji.com is a comprehensive information portal dedicated to the castles of Scotland, combining rich historical content, interactive maps, photo gall...
scalac.io is an international platform founded in 2014 to meet the challenges associated with big data management and business operations scaling, specializing in Scala, distributed systems, and cryptography solutions.
Describe your project by e-mail. I reply within 24 hours.
Describe your projectNeed to show the category hierarchy in your theme? Learn how to get the current category and its parent using get_the_category() and get_category_parents().
Need to get the URL of the first image or link in an article? Prefer DOMDocument over regex. Ready-made WordPress PHP for developers.
On 1 December 2026 Taylor Otwell shipped the Laravel Rust beta, and Laravel Go followed a day later. What the framework contains, what the 18x benchmark really measures, what happens to Laravel PHP and WordPress, and when a rewrite makes sense.
Custom WordPress engineering and architecture.
Scalable headless, ERP, and AI architecture for enterprise.
Stores, checkout flow, and sales logic.
Stability, updates, and post-launch support.
What the monthly care fee covers and what changes it.
Business process automation around WordPress and company systems.
Headless WordPress, Sanity, Strapi, and Contentful with Astro or Next.js.
Astro, MDX, edge delivery, and Core Web Vitals measured on real traffic.

How to start as a WordPress developer in 2026. Local environment, theme and plugin development, REST API and headless paths, security and Core Web Vitals. A practitioner playbook that does not waste your first month.

WordPress 7.0 with AI Client against Astro 7 with the Rust compiler and Vite 8. Speed, cost, SEO and security compared, plus the real bill for my own Astro 6 to 7 migration.

A detailed comparison table of EmDash CMS and WordPress across architecture, security, plugins, AI features, content model, hosting, and ecosystem maturity.