Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Franceconnect Bundle

Franceconnect Bundle Laravel Package

kleegroup/franceconnect-bundle

Symfony bundle for integrating FranceConnect authentication into PHP applications. It simplifies the OAuth2 authorization flow, callback handling, and retrieval of authenticated user data, making it easier to add the French government identity provider to your Symfony app.

View on GitHub
Deep Wiki
Context7

Symfony 3 Bundle for FranceConnect authentication.

Frequently asked questions about Franceconnect Bundle
Can I use kleegroup/franceconnect-bundle in a Laravel application?
No, not directly. It is a Symfony bundle that depends on bundle registration, a DI extension and configuration tree, and Symfony Security firewall authenticators, none of which have a Laravel analogue. For Laravel you should treat it as a specification reference and re-implement the flow with a Socialite or league/oauth2-client provider.
What does kleegroup/franceconnect-bundle actually do?
It integrates FranceConnect, the French government OpenID Connect identity federation, into a Symfony application. It provides a preconfigured OpenID Connect client, handles the authorization code exchange, retrieves verified identity data, and offers logout and identity mapping support. Users can then sign in with credentials from providers such as impots.gouv.fr, Ameli or La Poste.
Which Symfony and PHP versions does the bundle support?
Release 0.8 was upgraded to Symfony 6, so the PHP floor rises to roughly 8.1 and the Symfony 3 pins are presumably gone. A separate fix for the Symfony 4.3+ token suggests support may span 4.4, 5.x and 6.x rather than a hard 6-only pin. The release notes give PR titles only, so inspect composer.json and the test suite before relying on any constraint range.
How do I install and configure the bundle in a Symfony app?
Install it with Composer, register the bundle in your kernel or bundles.php, then supply client_id, client_secret, redirect_uri and the FranceConnect endpoints through the bundle configuration. Credentials should come from environment variables rather than committed config. In Laravel the equivalent settings belong in config/services.php with secrets in env or a secrets manager.
What is the best way to add FranceConnect login to Laravel?
Implement a custom Socialite provider backed by league/oauth2-client, wrap it in a thin service class, and add a dedicated controller for the callback. Keep configuration in config/services.php, credentials in env or Secrets Manager, and store the FranceConnect sub identifier in a column such as fc_sub on your users table. Budget roughly one to two weeks for a working sandbox flow and two to three weeks for a hardened one with state, nonce and JWKS caching.
Which scopes and user attributes does FranceConnect return?
The scope set used by the bundle is openid, given_name, family_name, birthdate, gender, birthplace, birthcountry, preferred_username, email and address. Map these to your local user attributes and always persist the stable FranceConnect sub claim as the account key. Because FranceConnect uses pairwise or public subject identifiers depending on your registration, do not assume the email is a unique key.
How should I handle FranceConnect logout and token revocation in Laravel?
Use the bundle's logout and revocation handling as your reference implementation. You need to end the local session, revoke the access token where applicable, and redirect to the FranceConnect end-session endpoint so the identity provider session is also closed. Skipping this leaves users silently re-authenticated on the next login attempt.
Is the bundle maintained and safe to run in production?
It is still pre-1.0 and effectively single-maintainer with a very small community, though version 0.8 shows active work against modern Symfony security APIs. There is no changelog detail or CI evidence published with the release, so treat the Symfony 6 claim as unverified until you read composer.json and run the tests. On a Symfony host it is a plausible choice if you assign a named internal maintainer, since the MIT license permits vendoring.
What are the alternatives to this bundle for FranceConnect authentication?
On Laravel the realistic options are a custom Socialite provider built on league/oauth2-client, another FranceConnect-specific Composer package, or a small Symfony backend-for-frontend that wraps this bundle and exposes a simple endpoint. Compare them on Laravel fit, maintenance ownership and how much FranceConnect-specific logic you have to encode yourself. The reusable value here is the encoded facts: endpoint URLs, scope set, attribute mapping, revocation and FranceConnect error codes.
What do I need before I can test FranceConnect in a sandbox?
You need an approved client_id and client_secret obtained through the DINUM convention d'engagement, with redirect URIs registered as exact matches, and you must follow the FranceConnect charter and branding rules. The sandbox environment lets you exercise the flow without real user impact, but the approval process is external and multi-week, so start it before any engineering sprint. In practice that dependency, not the code, dominates the schedule.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings