From 7144c911d735db1bab9b9fa9e9feb0dfedab4350 Mon Sep 17 00:00:00 2001 From: frikky Date: Fri, 22 Oct 2021 12:05:59 +0200 Subject: [PATCH] Added BASE_URL to .env --- .env | 1 + docker-compose.yml | 2 +- frontend/src/components/Oauth2Auth.jsx | 9 ++++----- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.env b/.env index 7e073bd9..5a78c4d8 100644 --- a/.env +++ b/.env @@ -30,6 +30,7 @@ SHUFFLE_FILE_LOCATION=./shuffle-files SHUFFLE_ENCRYPTION_MODIFIER= # Other configs +BASE_URL=http://shuffle-backend:5001 BACKEND_HOSTNAME=shuffle-backend BACKEND_PORT=5001 FRONTEND_PORT=3001 diff --git a/docker-compose.yml b/docker-compose.yml index eeefca1b..0b4bd8fa 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: '3' services: frontend: - build: ./frontend + #build: ./frontend image: ghcr.io/frikky/shuffle-frontend:nightly container_name: shuffle-frontend hostname: shuffle-frontend diff --git a/frontend/src/components/Oauth2Auth.jsx b/frontend/src/components/Oauth2Auth.jsx index 6335f47c..2d9afa2d 100644 --- a/frontend/src/components/Oauth2Auth.jsx +++ b/frontend/src/components/Oauth2Auth.jsx @@ -58,9 +58,8 @@ const AuthenticationOauth2 = (props) => { } const authentication_url = authenticationType.token_uri - console.log("AUTH: ", authenticationType) - - console.log("SCOPES2: ", resources) + //console.log("AUTH: ", authenticationType) + //console.log("SCOPES2: ", resources) const redirectUri = `${window.location.protocol}//${window.location.host}/set_authentication` var state = `workflow_id%3D${workflow.id}%26reference_action_id%3d${selectedAction.app_id}%26app_name%3d${selectedAction.app_name}%26app_id%3d${selectedAction.app_id}%26app_version%3d${selectedAction.app_version}%26authentication_url%3d${authentication_url}%26scope%3d${resources}%26client_id%3d${client_id}%26client_secret%3d${client_secret}` if (oauth_url !== undefined && oauth_url !== null && oauth_url.length > 0) { @@ -77,8 +76,8 @@ const AuthenticationOauth2 = (props) => { const url = `${authenticationType.redirect_uri}?client_id=${client_id}&redirect_uri=${redirectUri}&response_type=code&scope=${resources}&prompt=consent&state=${state}&access_type=offline` //const url = `https://accounts.zoho.com/oauth/v2/auth?response_type=code&client_id=${client_id}&scope=AaaServer.profile.Read&redirect_uri=${redirectUri}&prompt=consent` - console.log("Full URI: ", url) - console.log("Redirect Uri: ", redirectUri) + //console.log("Full URI: ", url) + //console.log("Redirect Uri: ", redirectUri) // &resource=https%3A%2F%2Fgraph.microsoft.com& // FIXME: Awful, but works for prototyping