We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7e8ef15 + b190b4a commit 88790a1Copy full SHA for 88790a1
src/components/Launch.js
@@ -11,13 +11,17 @@ export default function Launch() {
11
const [error, setError] = React.useState('');
12
13
React.useEffect(() => {
14
-
+ let authURL = 'launch-context.json';
15
+ if (process.env.REACT_APP_BACKEND_URL) {
16
+ authURL = `${process.env.REACT_APP_BACKEND_URL}/auth/auth-info`;
17
+ }
18
const urlParams = new URLSearchParams(window.location.search);
19
//retrieve patient id from URL querystring if any
20
let patientId = urlParams.get('patient');
21
console.log("patient id from url query string: ", patientId);
22
+ console.log("authURL: ", authURL);
23
- fetch('launch-context.json', {
24
+ fetch(authURL, {
25
// include cookies in request
26
credentials: 'include'
27
})
0 commit comments