@oslokommune/auth-bff 2.0.0-beta6 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -6
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,14 +4,14 @@ A NodeJS Backend for frontend.
|
|
|
4
4
|
|
|
5
5
|
Features:
|
|
6
6
|
|
|
7
|
+
* Serves a static web app
|
|
8
|
+
* Proxies API calls, with the user's access token
|
|
7
9
|
* Two "modes" of operation
|
|
8
10
|
* A vite plugin for use during development
|
|
9
11
|
* A standalone mode for use in production (e.g. inside a docker container)
|
|
10
12
|
* Supports generic OIDC auth code flow clients
|
|
11
13
|
* Has special support for `okdata`-generated Idporten clients
|
|
12
14
|
* Handles login/logout and sessions (using DynamoDb as a store)
|
|
13
|
-
* Proxies API calls
|
|
14
|
-
* Serves a static web app
|
|
15
15
|
* Includes simple React components for handling login-state
|
|
16
16
|
|
|
17
17
|
See https://github.com/oslokommune/auth-bff-example for an example React app using this package.
|
|
@@ -81,7 +81,7 @@ WORKDIR /application
|
|
|
81
81
|
EXPOSE 8080
|
|
82
82
|
COPY --from=react-build /home/react/dist /application/dist
|
|
83
83
|
ENV NODE_ENV=production
|
|
84
|
-
RUN npm install -g @oslokommune/auth-bff@2.0.0
|
|
84
|
+
RUN npm install -g @oslokommune/auth-bff@2.0.0
|
|
85
85
|
COPY bff.config.json /application/
|
|
86
86
|
CMD ["auth-bff"]
|
|
87
87
|
```
|
|
@@ -161,7 +161,8 @@ AWS Parameter store:
|
|
|
161
161
|
This loads from the configured AWS environment. For this to work on your local machine the `AWS_PROFILE` environment
|
|
162
162
|
variable must be set, and you must be signed in to that profile
|
|
163
163
|
|
|
164
|
-
|
|
164
|
+
> [!NOTE]
|
|
165
|
+
>️ See [`config.ts`](src/config.ts) for a description of all config parameters
|
|
165
166
|
|
|
166
167
|
## Using with ID-porten (via `okdata`):
|
|
167
168
|
|
|
@@ -240,7 +241,7 @@ sessions during front-channel logout)
|
|
|
240
241
|
> If the table does not exist, it will be automatically created with settings not appropriate for production.
|
|
241
242
|
|
|
242
243
|
|
|
243
|
-
Here is an example configuration in terraform. If you are using (https://km.oslo.systems/)
|
|
244
|
+
Here is an example configuration in terraform. If you are using [Golden Path](https://km.oslo.systems/),
|
|
244
245
|
you can simply copy this to a file in your application stack, and run `terraform apply`
|
|
245
246
|
|
|
246
247
|
```terraform
|
|
@@ -371,6 +372,6 @@ if (authState === 'authenticated') {
|
|
|
371
372
|
## Content Security Policy
|
|
372
373
|
|
|
373
374
|
To configure the content security policy returned by the server, use the `contentSecurityPolicy` config option. This
|
|
374
|
-
configuration is passed almost as-is to (
|
|
375
|
+
configuration is passed almost as-is to [helmet](https://github.com/helmetjs/helmet). Since our configuration is json
|
|
375
376
|
only, not all features are supported. To set a nonce, use the special form `"{nonce}"` instead. It will be replaced by a
|
|
376
377
|
generated nonce for each request.
|
package/dist/package.json
CHANGED