Skip to content

Commit

Permalink
fix(app): adapt app to Keycloak update
Browse files Browse the repository at this point in the history
  • Loading branch information
tamslo committed Jul 12, 2024
1 parent 07a5b61 commit 92671b7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/lib/common/constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Uri anniUrl([String slug = '']) =>
Uri labServerUrl([String slug = '']) =>
Uri.http('vm-slosarek01.dhclab.i.hpi.de:8081', 'api/v1/$slug');
Uri keycloakUrl([String slug = '']) =>
Uri.http('vm-slosarek01.dhclab.i.hpi.de:28080', 'auth/$slug');
Uri.http('vm-slosarek01.dhclab.i.hpi.de:28080', slug);

// Note that sending emails will not work on the iPhone Simulator since it does
// not have any email application installed.
Expand Down
16 changes: 10 additions & 6 deletions lab-server/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,17 @@ Please also see the [contribution guide in the root folder](../CONTRIBUTING.md).
configured in the `.env` file
- Create a realm called `KEYCLOAK_REALM` (see `.env`)
- Create clients (one for the backend and one for the frontend)
- For the backend with name `KEYCLOAK_CLIENT_ID` (see `.env`) and
`access-type` "bearer only"; in the credentials tab create a secret and
update the `.env` value `KEYCLOAK_SECRET` accordingly
- For the backend with name `KEYCLOAK_CLIENT_ID` (see `.env`)
- `access-type` "bearer only" (uncheck all other types, see
[StackOverflow](https://stackoverflow.com/a/75040248))
- In the credentials tab (enable "Client authentication" and save to enable
tab, see [StackOverflow](https://stackoverflow.com/a/44753547)) create a
secret and update the `.env` value `KEYCLOAK_SECRET` accordingly
- For the frontend with the name `pharme-app` (as `clientId` in
`app/lib/login/pages/cubit.dart`) and `access-type` "public";
set the redirect URI to `*` (note that this is bad practice security-wise
and should only be done in a local testing environment!)
`app/lib/login/pages/cubit.dart`)
- `access-type` "public" ("Client authentication" off)
- set the redirect URI to `localhost:/*` (as specified in
`callbackUrlScheme` in `app/lib/login/pages/cubit.dart`)
- Create a user for testing (you can choose username and password freely, no
roles are required); when setting the password, set "Temporary" to "OFF"
- For more information see
Expand Down

0 comments on commit 92671b7

Please sign in to comment.