diff --git a/src/containers/Index.jsx b/src/containers/Index.jsx index 069086b..903ac44 100644 --- a/src/containers/Index.jsx +++ b/src/containers/Index.jsx @@ -27,7 +27,11 @@ const Index = (props) => { } else { setBackOffice(false); } + } else { + // if no realm_access set, default to not using the back office + setBackOffice(false); } + console.log('isBackOffice: ' + isBackOffice); } useEffect(() => { FHIR.oauth2.ready().then(client => { diff --git a/src/containers/Launch.jsx b/src/containers/Launch.jsx index 5e8db74..dc2d865 100644 --- a/src/containers/Launch.jsx +++ b/src/containers/Launch.jsx @@ -25,7 +25,14 @@ const Launch = props => { localStorage.setItem('clients', JSON.stringify(clients)); } } - const params = queryString.parse((window.location.hash || '').replace(/\/?#\/?launch\?/, '')); + + let params = queryString.parse((window.location.hash || '').replace(/\/?#\/?launch\?/, '')); + + // if no hash # value, pull the parameters out of the search + if (!params.iss) { + params = queryString.parse((window.location.search || '').replace(/\/?#?\/?[launch]?\?/, '')); + } + const iss = params.iss; console.log('iss: ' + iss); const launch = params.launch;