/service-provider-example

An implementation example of the FranceConnect button on a service provider's website.

Primary LanguageJavaScript

service-provider-example

An implementation example of the FranceConnect button on a service provider's website. There are two uses for the FranceConnect button in this example: 1) identify the user, 2) get their consent on personnal data exchange.

Prerequisites

This server use nodejs version 8.12.

Install

git clone git@github.com:france-connect/service-provider-example.git
cd service-provider-example
npm install

Run the app

npm start

Use the app

When you start the app, the demo is available at : http://localhost:3000.

To start the France Connect authentication process, click on the France Connect button.

You will be prompted to choose an identity provider. Choose 'identity-provider-example'.

You can use the following test credentials : 3_melaine | 123

More credentials are available here.

Run the app with a local Data Provider (optional)

By default the app will interact with a Data Provider available online.

You can use a local instance of this Data Provider instead:

  1. Install and run this Data Provider (go through the optional connected installation)
  2. Restart this Service Provider with FD_URL=http://localhost:4000 npm start

Run the tests

npm test

Run the linter

Run the linter with:

npm run lint

Public key for Franceconnect integration environment

This repository is shipped with public integration keys. It allow you to discover the application and start your tests without waiting for the validation of your request on https://datapass.api.gouv.fr/franceconnect.

This key is for limited use and has no support from our team:

  • CLIENT_ID: '211286433e39cce01db448d80181bdfd005554b19cd51b3fe7943f6b3b86ab6e'
  • CLIENT_SECRET: '2791a731e6a59f56b6b4dd0d08c9b1f593b5f3658b9fd731cb24248e2669af4b'

The allowed callback URL with this key are listed bellow :