Skip to content

Commit 081f222

Browse files
committed
fix smart launch from MELD sandbox
1 parent bd688dd commit 081f222

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

src/containers/Index.jsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ const Index = (props) => {
2727
} else {
2828
setBackOffice(false);
2929
}
30+
} else {
31+
// if no realm_access set, default to not using the back office
32+
setBackOffice(false);
3033
}
34+
console.log('isBackOffice: ' + isBackOffice);
3135
}
3236
useEffect(() => {
3337
FHIR.oauth2.ready().then(client => {

src/containers/Launch.jsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,14 @@ const Launch = props => {
2525
localStorage.setItem('clients', JSON.stringify(clients));
2626
}
2727
}
28-
const params = queryString.parse((window.location.hash || '').replace(/\/?#\/?launch\?/, ''));
28+
29+
let params = queryString.parse((window.location.hash || '').replace(/\/?#\/?launch\?/, ''));
30+
31+
// if no hash # value, pull the parameters out of the search
32+
if (!params.iss) {
33+
params = queryString.parse((window.location.search || '').replace(/\/?#?\/?[launch]?\?/, ''));
34+
}
35+
2936
const iss = params.iss;
3037
console.log('iss: ' + iss);
3138
const launch = params.launch;

0 commit comments

Comments
 (0)