Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ PUBLIC_MATOMO_CDN_URL="https://stats.data.gouv.fr/"
PUBLIC_MATOMO_SITE_ID="315"

#### FranceConnect login proxy. This should be empty in production.
PUBLIC_FC_PROXY="https://ami-fc-proxy-dev.osc-fr1.scalingo.io/"
PUBLIC_FC_PROXY=""

#### FranceConnect AMI variables
FC_AMI_CLIENT_ID="33fe498cc172fe691778912a2967baa650b24f1ae0ebbe47ae552f37b2d25ead"
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,13 @@ jobs:
working-directory: ./public/mobile-app
run: npm ci

- run: make lint-and-format
- name: lint-and-format
env:
AUTH_COOKIE_JWT_SECRET: secret
PARTNERS_PSL_SECRET: secret
PUBLIC_WEBSITE_PUBLIC: true
PUBLIC_FC_PROXY: https://ami-fc-proxy-dev.osc-fr1.scalingo.io/
run: make lint-and-format

run-tests:
name: python
Expand Down Expand Up @@ -66,6 +72,8 @@ jobs:
echo "PARTNERS_DINUM_AMI_SECRET=\"secret\"" >> .env.local

- name: Run tests
env:
PUBLIC_FC_PROXY: https://ami-fc-proxy-dev.osc-fr1.scalingo.io/
run: make test-ci

mobile-app-tests:
Expand Down Expand Up @@ -95,4 +103,5 @@ jobs:
AUTH_COOKIE_JWT_SECRET: secret
PARTNERS_PSL_SECRET: secret
PUBLIC_WEBSITE_PUBLIC: true
PUBLIC_FC_PROXY: https://ami-fc-proxy-dev.osc-fr1.scalingo.io/
run: npm test
13 changes: 8 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,9 @@ from the following files in your environment directory, in this order:

.env # loaded in all cases
.env.local # loaded in all cases, ignored by git
.env.development # loaded only in development
.env.development # loaded only in development, values should be overloaded on Scalingo
.env.development.local # loaded only in development, ignored by git

`.env.development` files are not loaded by the backend unless you add them to your `uv run` command lines.

### 4. Run Database Migrations

Apply the database schema:
Expand Down Expand Up @@ -249,8 +247,13 @@ on Scalingo.

We now use a
[proxy](https://ami-fc-proxy-dev.osc-fr1.scalingo.io/)
through the configuration of the `FC_PROXY` env variable in the `.env` file, so
none of that is needed anymore, it's all been configured once and for all.
through the configuration of the `FC_PROXY` env variable.
It needs to be set through Scalingo in the staging and review apps,
and for local development, it needs to be set in the `.env.local` file.

```
PUBLIC_FC_PROXY="https://ami-fc-proxy-dev.osc-fr1.scalingo.io/"
```

## Pro Connect

Expand Down
7 changes: 6 additions & 1 deletion ami/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,12 @@ def before_send(event, hint):
FC_AMI_CLIENT_ID = CONFIG["FC_AMI_CLIENT_ID"]
FC_AMI_CLIENT_SECRET = CONFIG["FC_AMI_CLIENT_SECRET"]
PUBLIC_FC_BASE_URL = CONFIG["PUBLIC_FC_BASE_URL"]
PUBLIC_FC_PROXY = CONFIG["PUBLIC_FC_PROXY"]

# This should not be set in production:
# It should be set in the .env.local file for local development
# and in the Scalingo staging and review apps as an env variable.
PUBLIC_FC_PROXY = CONFIG.get("PUBLIC_FC_PROXY")

FC_SCOPE = CONFIG["FC_SCOPE"]
FC_AMI_REDIRECT_URL = PUBLIC_API_URL + "/login-callback"
FC_TOKEN_ENDPOINT = "/api/v2/token"
Expand Down
Loading