diff --git a/xas-standards-api/src/xas_standards_api/auth.py b/xas-standards-api/src/xas_standards_api/auth.py index 7c15564..b1aa3b3 100644 --- a/xas-standards-api/src/xas_standards_api/auth.py +++ b/xas-standards-api/src/xas_standards_api/auth.py @@ -11,6 +11,7 @@ get_bearer_token = HTTPBearer(auto_error=True) oidc_user_info_endpoint = os.environ.get("OIDC_USER_INFO_ENDPOINT") +oidc_id_key = os.environ.get("OIDC_ID_KEY", "id") dev = False env_value = os.environ.get("FASTAPI_APP_ENV") @@ -50,4 +51,4 @@ async def get_current_user( detail="Invalid user token", ) - return response.json()["id"] + return response.json()[oidc_id_key] diff --git a/xas-standards-client/src/components/review/ReviewPage.tsx b/xas-standards-client/src/components/review/ReviewPage.tsx index 6cf09df..0f69cd9 100644 --- a/xas-standards-client/src/components/review/ReviewPage.tsx +++ b/xas-standards-client/src/components/review/ReviewPage.tsx @@ -22,7 +22,7 @@ function ReviewPage() { function getData() { return (id: number) => { - axios.get(data_url + "/" + id + "/?format=json").then((response) => { + axios.get(data_url + "/" + id + "?format=json").then((response) => { const output: XASData = response.data as XASData; const containsTrans = output != null && output.mutrans.length != 0; const containsFluor = output != null && output.mufluor.length != 0;