diff --git a/src/lib/config.ts b/src/lib/config.ts index a0cb7278..0ecd37d4 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -6,11 +6,18 @@ export const API_BASE = import.meta.env.VITE_API_BASE; export const INTERMEDIATE_FHIR_SERVER_BASE = import.meta.env.VITE_INTERMEDIATE_FHIR_SERVER_BASE; export const SOF_HOSTS = [ + // { + // id: "smit", + // name: "SMART Health IT Demo", + // url: "https://launch.smarthealthit.org/v/r4/sim/WzMsIiIsIiIsIkFVVE8iLDAsMCwwLCIiLCIiLCIiLCIiLCIiLCIiLCIiLDAsMF0/fhir", + // clientId: "", + // note: "Credentials provided" + // }, { - id: "smit", - name: "SMART Health IT Demo", - url: "https://launch.smarthealthit.org/v/r4/sim/WzMsIiIsIiIsIkFVVE8iLDAsMCwwLCIiLCIiLCIiLCIiLCIiLCIiLCIiLDAsMF0/fhir", - clientId: "", + id: "keycloak", + name: "Let's Talk Tech Login", + url: "https://keycloak.inform.dev.cirg.uw.edu/realms/ltt", + clientId: "shl_creator", note: "Credentials provided" } ]; diff --git a/src/lib/sofClient.js b/src/lib/sofClient.js index 6a50d10a..3fcb526d 100644 --- a/src/lib/sofClient.js +++ b/src/lib/sofClient.js @@ -17,6 +17,12 @@ let client; function authorize(inputFhirUrl, clientId) { config.iss = inputFhirUrl; config.clientId = clientId ?? "no clientId configured"; + // TODO: Remove in favor of producing correct token response on server side + let fakeTokenResponse = { + authorizeUri: "https://keycloak.inform.dev.cirg.uw.edu/realms/ltt/protocol/openid-connect/auth", + tokenUri: "https://keycloak.inform.dev.cirg.uw.edu/realms/ltt/protocol/openid-connect/token" + } + config.fakeTokenResponse = fakeTokenResponse; return FHIR.oauth2.authorize(config); };