diff --git a/packages/backend/src/apps/discord/info.json b/packages/backend/src/apps/discord/info.json index c70cb3f5..94292370 100644 --- a/packages/backend/src/apps/discord/info.json +++ b/packages/backend/src/apps/discord/info.json @@ -11,7 +11,7 @@ "type": "string", "required": true, "readOnly": true, - "value": "https://localhost:3001/app/discord/connections/add", + "value": "{WEB_APP_URL}/app/discord/connections/add", "placeholder": null, "description": "When asked to input an OAuth callback or redirect URL in Discord OAuth, enter the URL above.", "docUrl": "https://automatisch.io/docs/discord#oauth-redirect-url", diff --git a/packages/backend/src/apps/firebase/info.json b/packages/backend/src/apps/firebase/info.json index 33f375dc..4e1775ab 100644 --- a/packages/backend/src/apps/firebase/info.json +++ b/packages/backend/src/apps/firebase/info.json @@ -11,7 +11,7 @@ "type": "string", "required": true, "readOnly": true, - "value": "https://localhost:3001/app/firebase/connections/add", + "value": "{WEB_APP_URL}/app/firebase/connections/add", "placeholder": null, "description": "When asked to input an OAuth callback or redirect URL in Firebase OAuth, enter the URL above.", "docUrl": "https://automatisch.io/docs/firebase#oauth-redirect-url", diff --git a/packages/backend/src/apps/flickr/info.json b/packages/backend/src/apps/flickr/info.json index b75b55dd..0ab9dc7f 100644 --- a/packages/backend/src/apps/flickr/info.json +++ b/packages/backend/src/apps/flickr/info.json @@ -11,7 +11,7 @@ "type": "string", "required": true, "readOnly": true, - "value": "http://localhost:3001/app/flickr/connections/add", + "value": "{WEB_APP_URL}/app/flickr/connections/add", "placeholder": null, "description": "When asked to input an OAuth callback or redirect URL in Flickr OAuth, enter the URL above.", "docUrl": "https://automatisch.io/docs/flickr#oauth-redirect-url", diff --git a/packages/backend/src/apps/github/info.json b/packages/backend/src/apps/github/info.json index e8789051..d5d6af57 100644 --- a/packages/backend/src/apps/github/info.json +++ b/packages/backend/src/apps/github/info.json @@ -11,7 +11,7 @@ "type": "string", "required": true, "readOnly": true, - "value": "https://localhost:3001/app/github/connections/add", + "value": "{WEB_APP_URL}/app/github/connections/add", "placeholder": null, "description": "When asked to input an OAuth callback or redirect URL in Github OAuth, enter the URL above.", "docUrl": "https://automatisch.io/docs/github#oauth-redirect-url", diff --git a/packages/backend/src/apps/twitch/info.json b/packages/backend/src/apps/twitch/info.json index 3110789d..23059540 100644 --- a/packages/backend/src/apps/twitch/info.json +++ b/packages/backend/src/apps/twitch/info.json @@ -11,7 +11,7 @@ "type": "string", "required": true, "readOnly": true, - "value": "https://localhost:3001/app/twitch/connections/add", + "value": "{WEB_APP_URL}/app/twitch/connections/add", "placeholder": null, "description": "When asked to input an OAuth callback or redirect URL in Twitch OAuth, enter the URL above.", "docUrl": "https://automatisch.io/docs/twitch#oauth-redirect-url", diff --git a/packages/backend/src/apps/twitter/info.json b/packages/backend/src/apps/twitter/info.json index b0909e42..560c234e 100644 --- a/packages/backend/src/apps/twitter/info.json +++ b/packages/backend/src/apps/twitter/info.json @@ -11,7 +11,7 @@ "type": "string", "required": true, "readOnly": true, - "value": "https://localhost:3001/app/twitter/connections/add", + "value": "{WEB_APP_URL}/app/twitter/connections/add", "placeholder": null, "description": "When asked to input an OAuth callback or redirect URL in Twitter OAuth, enter the URL above.", "docUrl": "https://automatisch.io/docs/twitter#oauth-redirect-url", diff --git a/packages/backend/src/apps/typeform/info.json b/packages/backend/src/apps/typeform/info.json index 9cb796c8..11cdf13b 100644 --- a/packages/backend/src/apps/typeform/info.json +++ b/packages/backend/src/apps/typeform/info.json @@ -11,7 +11,7 @@ "type": "string", "required": true, "readOnly": true, - "value": "https://localhost:3001/app/typeform/connections/add", + "value": "{WEB_APP_URL}/app/typeform/connections/add", "placeholder": null, "description": "When asked to input an OAuth callback or redirect URL in Typeform OAuth, enter the URL above.", "docUrl": "https://automatisch.io/docs/typeform#oauth-redirect-url", diff --git a/packages/backend/src/helpers/app-info-converter.ts b/packages/backend/src/helpers/app-info-converter.ts index 052f7ef5..7976a801 100644 --- a/packages/backend/src/helpers/app-info-converter.ts +++ b/packages/backend/src/helpers/app-info-converter.ts @@ -2,9 +2,10 @@ import AppInfoType from '../types/app-info'; import appConfig from '../config/app'; const appInfoConverter = (rawAppData: string) => { - const computedRawData = rawAppData.replace('{BASE_URL}', appConfig.baseUrl); - const computedJSONData: AppInfoType = JSON.parse(computedRawData) + let computedRawData = rawAppData.replace('{BASE_URL}', appConfig.baseUrl); + computedRawData = rawAppData.replace('{WEB_APP_URL}', appConfig.webAppUrl); + const computedJSONData: AppInfoType = JSON.parse(computedRawData) return computedJSONData; }