This is a minimal, nodeJS-based ProConnect client, to be used for end-to-end testing.
It uses the https://github.com/panva/node-openid-client Library for the actual OIDC Logic.
This tool can be used to test the traditional Authorization Code Flow.
It also uses the select_organization
& update_userinfo
ProConnect prompts (available only on ProConnect Identité).
This tool is fully configured using environment variables.
Pull the image:
docker pull ghcr.io/numerique-gouv/proconnect-test-client
Run the container:
docker run --rm \
-p 3000:3000 \
-e PORT=3000 \
ghcr.io/numerique-gouv/proconnect-test-client
In docker-compose.yml
:
version: "3.5"
services:
proconnect-test-client:
image: numerique-gouv/proconnect-test-client
ports:
- 3000:3000
environment:
PORT: 3000
Run the container:
docker-compose up
Install the dependencies:
npm i
Run the server:
npm start
Available env variables for ProConnect Identité are listed here.
Available env variables for ProConnect Fédération are listed here.
You can use the app-sandbox.moncomptepro.beta.gouv.fr oidc provider with the following client configuration:
client_id: client_id
client_secret: client_secret
login_callbacks: ["http://localhost:3000/login-callback"]
logout_callbacks: ["http://localhost:3000/"]
authorized_scopes: openid email profile organization
More clients are available at: https://github.com/numerique-gouv/moncomptepro/blob/master/scripts/fixtures.sql
cd e2e
npm i
npm test