Skip to content

Commit 18c2a2a

Browse files
Merge pull request #88 from DiamondLightSource/migrate-keycloak-clients
Migrate to keycloak clients provided by new DLS keycloak servers
2 parents 501078d + 7af8f2f commit 18c2a2a

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ git clone https://github.com/DiamondLightSource/TomoHub
3939
In `frontend/`, add an `.env.local` file with the following contents:
4040
```
4141
VITE_API_BASE_URL = "http://localhost:8000"
42-
VITE_KEYCLOAK_CLIENT_ID = "tomohub-dev"
42+
VITE_KEYCLOAK_URL = "https://identity-test.diamond.ac.uk"
43+
VITE_KEYCLOAK_REALM = "dls"
44+
VITE_KEYCLOAK_CLIENT_ID = "TomoHubDev"
4345
```
4446

4547
#### Install dependencies and generate code from GraphQL schema

frontend/.env.production

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
VITE_API_BASE_URL = "/api"
2-
VITE_KEYCLOAK_CLIENT_ID = "tomohub"
2+
VITE_KEYCLOAK_URL = "https://identity.diamond.ac.uk"
3+
VITE_KEYCLOAK_REALM = "dls"
4+
VITE_KEYCLOAK_CLIENT_ID = "TomoHub"

frontend/src/keycloak.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import Keycloak from "keycloak-js";
22

33
const keycloakConfig = {
4-
url: "https://authn.diamond.ac.uk/",
5-
realm: "master",
4+
url: import.meta.env.VITE_KEYCLOAK_URL,
5+
realm: import.meta.env.VITE_KEYCLOAK_REALM,
66
clientId: import.meta.env.VITE_KEYCLOAK_CLIENT_ID,
77
};
88

0 commit comments

Comments
 (0)