Skip to content

Commit

Permalink
Remove SITE_URL from frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
dangtony98 committed Dec 18, 2022
1 parent 4dac03a commit 1447e05
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 7 deletions.
1 change: 0 additions & 1 deletion docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ services:
environment:
- NEXT_PUBLIC_ENV=development
- INFISICAL_TELEMETRY_ENABLED=${TELEMETRY_ENABLED}
- NEXT_PUBLIC_SITE_URL=${SITE_URL}
- NEXT_PUBLIC_STRIPE_PRODUCT_PRO=${STRIPE_PRODUCT_PRO}
- NEXT_PUBLIC_STRIPE_PRODUCT_STARTER=${STRIPE_PRODUCT_STARTER}
- NEXT_PUBLIC_CLIENT_ID_HEROKU=${CLIENT_ID_HEROKU}
Expand Down
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ services:
- INFISICAL_TELEMETRY_ENABLED=${TELEMETRY_ENABLED}
- NEXT_PUBLIC_STRIPE_PRODUCT_PRO=${STRIPE_PRODUCT_PRO}
- NEXT_PUBLIC_STRIPE_PRODUCT_STARTER=${STRIPE_PRODUCT_STARTER}
- NEXT_PUBLIC_SITE_URL=${SITE_URL}
- NEXT_PUBLIC_CLIENT_ID_HEROKU=${CLIENT_ID_HEROKU}
- NEXT_PUBLIC_CLIENT_ID_NETLIFY=${CLIENT_ID_NETLIFY}
networks:
Expand Down
2 changes: 0 additions & 2 deletions frontend/components/utilities/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ const POSTHOG_HOST =
process.env.NEXT_PUBLIC_POSTHOG_HOST! || "https://app.posthog.com";
const STRIPE_PRODUCT_PRO = process.env.NEXT_PUBLIC_STRIPE_PRODUCT_PRO!;
const STRIPE_PRODUCT_STARTER = process.env.NEXT_PUBLIC_STRIPE_PRODUCT_STARTER!;
const SITE_URL = process.env.NEXT_PUBLIC_SITE_URL!;
const CLIENT_ID_HEROKU = process.env.NEXT_PUBLIC_CLIENT_ID_HEROKU!;
const CLIENT_ID_NETLIFY = process.env.NEXT_PUBLIC_CLIENT_ID_NETLIFY!;

Expand All @@ -14,7 +13,6 @@ export {
POSTHOG_HOST,
STRIPE_PRODUCT_PRO,
STRIPE_PRODUCT_STARTER,
SITE_URL,
CLIENT_ID_HEROKU,
CLIENT_ID_NETLIFY
};
3 changes: 2 additions & 1 deletion frontend/pages/integrations/[id].js
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ export default function Integrations() {
* @returns
*/
const handleIntegrationOption = async ({ integrationOption }) => {

try {
// generate CSRF token for OAuth2 code-token exchange integrations
const state = crypto.randomBytes(16).toString("hex");
Expand All @@ -131,7 +132,7 @@ export default function Integrations() {
window.location = `https://vercel.com/integrations/infisical-dev/new?state=${state}`;
break;
case 'Netlify':
window.location = `https://app.netlify.com/authorize?client_id=${integrationOption.clientId}&response_type=code&state=${state}&redirect_uri=${integrationOption.redirectURL}`;
window.location = `https://app.netlify.com/authorize?client_id=${integrationOption.clientId}&response_type=code&state=${state}&redirect_uri=${window.location.origin}`;
break;
// case 'Fly.io':
// console.log('fly.io');
Expand Down
2 changes: 0 additions & 2 deletions frontend/public/data/cloudIntegrations.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {
SITE_URL,
CLIENT_ID_HEROKU,
CLIENT_ID_NETLIFY
} from '../../components/utilities/config';
Expand Down Expand Up @@ -30,7 +29,6 @@ const cloudIntegrationOptions = [
isAvailable: true,
type: 'oauth2',
clientId: CLIENT_ID_NETLIFY,
redirectURL: `${SITE_URL}/netlify`,
docsLink: ''
},
{
Expand Down

0 comments on commit 1447e05

Please sign in to comment.