Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/test credentials #356

Closed
wants to merge 17 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 0 additions & 30 deletions .github/workflows/docker-compose.dev.healthcheck.yml

This file was deleted.

48 changes: 39 additions & 9 deletions apps/client-ts/src/components/Auth/b2c/LoginWithStytchSDKUI.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { StytchLogin } from '@stytch/nextjs';
import { StytchLoginConfig, OAuthProviders, Products, StyleConfig, StytchEvent, StytchError } from '@stytch/vanilla-js';
import { getDomainFromWindow } from '@/lib/stytch/urlUtils';
import { Button } from '@/components/ui/button';
import { Icons } from '@/components/shared/icons';

const sdkStyle: StyleConfig = {
fontFamily: '"Helvetica New", Helvetica, sans-serif',
Expand Down Expand Up @@ -31,18 +32,47 @@ const callbackConfig = {
onError: (error: StytchError) => console.log(error),
}

const getOauthUrl = (provider: string) => {
const isTest = process.env.NEXT_PUBLIC_STYTCH_PROJECT_ENV == 'test';
const baseStytch = isTest ? "test" : "api"
return `https://${baseStytch}.stytch.com/v1/public/oauth/${provider.toLowerCase()}/start?public_token=${process.env.NEXT_PUBLIC_STYTCH_PUBLIC_TOKEN}`;
}

const LoginWithStytchSDKUI = () => {
return (
<>
<div className='flex flex-row mb-2'>
<a href='https://test.stytch.com/v1/public/oauth/google/start?public_token=public-token-test-1881250c-afb6-4c09-b284-95592cf2fd62' target='_blank'>
<Button>Log In With Google</Button>
</a>
<a className='pl-3' href='https://test.stytch.com/v1/public/oauth/github/start?public_token=public-token-test-1881250c-afb6-4c09-b284-95592cf2fd62' target='_blank'>
<Button>Log In With Github</Button>
</a>
</div>
<StytchLogin config={sdkConfig} styles={sdkStyle} callbacks={callbackConfig} />
<div className='w-1'>
<StytchLogin config={sdkConfig} styles={sdkStyle} callbacks={callbackConfig} />
</div>
<div className="relative my-5">
<div className="absolute inset-0 flex items-center">
<span className="w-full border-t" />
</div>
<div className="relative flex justify-center text-xs uppercase">
<span className="bg-background px-2 text-muted-foreground">
Or continue with
</span>
</div>
</div>
<Button
variant={"outline"}
onClick={() => {
window.open(getOauthUrl("github"), '_blank');
}}
className='mb-2'
>
<Icons.gitHub className="mr-2 h-4 w-4" />{" "}
Github
</Button>
<Button
variant={"outline"}
onClick={() => {
window.open(getOauthUrl("google"), '_blank');
}}
>
<Icons.google className="mr-2 h-4 w-4" />{" "}
Google
</Button>
</>
)
}
Expand Down
26 changes: 26 additions & 0 deletions apps/client-ts/src/components/shared/icons.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { LucideProps } from "lucide-react";



export const Icons = {
gitHub: ({ ...props }: LucideProps) => (
<svg
aria-hidden="true"
focusable="false"
data-prefix="fab"
data-icon="github"
role="img"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 496 512"
{...props}
>
<path
fill="currentColor"
d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3 .3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5 .3-6.2 2.3zm44.2-1.7c-2.9 .7-4.9 2.6-4.6 4.9 .3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3 .7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3 .3 2.9 2.3 3.9 1.6 1 3.6 .7 4.3-.7 .7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3 .7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3 .7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"
></path>
</svg>
),
google: ({ ...props }: LucideProps) => (
<svg {...props} xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z" fill="#4285F4"/><path d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z" fill="#34A853"/><path d="M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z" fill="#FBBC05"/><path d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z" fill="#EA4335"/><path d="M1 1h22v22H1z" fill="none"/></svg>
)
}
34 changes: 27 additions & 7 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ services:
JIRA_SERVICE_MGMT_TICKETING_CLIENT_SECRET: ${JIRA_SERVICE_MGMT_TICKETING_CLIENT_SECRET}
LINEAR_TICKETING_CLIENT_ID: ${LINEAR_TICKETING_CLIENT_ID}
LINEAR_TICKETING_CLIENT_SECRET: ${LINEAR_TICKETING_CLIENT_SECRET}
AFFINITY_CRM_CLIENT_ID: ${AFFINITY_CRM_CLIENT_ID}
AFFINITY_CRM_CLIENT_SECRET: ${AFFINITY_CRM_CLIENT_SECRET}
ACCELO_CRM_CLIENT_ID: ${ACCELO_CRM_CLIENT_ID}
ACCELO_CRM_CLIENT_SECRET: ${ACCELO_CRM_CLIENT_SECRET}
ACCELO_CRM_SUBDOMAIN: ${ACCELO_CRM_SUBDOMAIN}
Expand All @@ -77,20 +75,42 @@ services:
CLOSE_CRM_CLIENT_SECRET: ${CLOSE_CRM_CLIENT_SECRET}
COPPER_CRM_CLIENT_ID: ${COPPER_CRM_CLIENT_ID}
COPPER_CRM_CLIENT_SECRET: ${COPPER_CRM_CLIENT_SECRET}
INSIGHTLY_CRM_CLIENT_ID: ${INSIGHTLY_CRM_CLIENT_ID}
INSIGHTLY_CRM_CLIENT_SECRET: ${INSIGHTLY_CRM_CLIENT_SECRET}
KEAP_CRM_CLIENT_ID: ${KEAP_CRM_CLIENT_ID}
KEAP_CRM_CLIENT_SECRET: ${KEAP_CRM_CLIENT_SECRET}
SUGARCRM_CRM_CLIENT_ID: ${SUGARCRM_CRM_CLIENT_ID}
SUGARCRM_CRM_CLIENT_SECRET: ${SUGARCRM_CRM_CLIENT_SECRET}
SUGARCRM_CRM_SUBDOMAIN: ${SUGARCRM_CRM_SUBDOMAIN}
TEAMLEADER_CRM_CLIENT_ID: ${TEAMLEADER_CRM_CLIENT_ID}
TEAMLEADER_CRM_CLIENT_SECRET: ${TEAMLEADER_CRM_CLIENT_SECRET}
TEAMWORK_CRM_CLIENT_ID: ${TEAMWORK_CRM_CLIENT_ID}
TEAMWORK_CRM_CLIENT_SECRET: ${TEAMWORK_CRM_CLIENT_SECRET}
AHA_TICKETING_CLIENT_ID: ${AHA_TICKETING_CLIENT_ID}
AHA_TICKETING_CLIENT_SECRET: ${AHA_TICKETING_CLIENT_SECRET}
AHA_TICKETING_SUBDOMAIN: ${AHA_TICKETING_SUBDOMAIN}
WRIKE_TICKETING_CLOUD_CLIENT_ID: ${WRIKE_TICKETING_CLOUD_CLIENT_ID}
WRIKE_TICKETING_CLOUD_CLIENT_SECRET: ${WRIKE_TICKETING_CLOUD_CLIENT_SECRET}
ASANA_TICKETING_CLOUD_CLIENT_ID: ${ASANA_TICKETING_CLOUD_CLIENT_ID}
ASANA_TICKETING_CLOUD_CLIENT_SECRET: ${ASANA_TICKETING_CLOUD_CLIENT_SECRET}
PENNYLANE_ACCOUNTING_CLOUD_CLIENT_ID: ${PENNYLANE_ACCOUNTING_CLOUD_CLIENT_ID}
PENNYLANE_ACCOUNTING_CLOUD_CLIENT_SECRET: ${PENNYLANE_ACCOUNTING_CLOUD_CLIENT_SECRET}
FRESHBOOKS_ACCOUNTING_CLOUD_CLIENT_ID: ${FRESHBOOKS_ACCOUNTING_CLOUD_CLIENT_ID}
FRESHBOOKS_ACCOUNTING_CLOUD_CLIENT_SECRET: ${FRESHBOOKS_ACCOUNTING_CLOUD_CLIENT_SECRET}
FREEAGENT_ACCOUNTING_CLOUD_CLIENT_ID: ${FREEAGENT_ACCOUNTING_CLOUD_CLIENT_ID}
FREEAGENT_ACCOUNTING_CLOUD_CLIENT_SECRET: ${FREEAGENT_ACCOUNTING_CLOUD_CLIENT_SECRET}
SAGE_ACCOUNTING_CLOUD_CLIENT_ID: ${SAGE_ACCOUNTING_CLOUD_CLIENT_ID}
SAGE_ACCOUNTING_CLOUD_CLIENT_SECRET: ${SAGE_ACCOUNTING_CLOUD_CLIENT_SECRET}
MONEYBIRD_ACCOUNTING_CLOUD_CLIENT_ID: ${MONEYBIRD_ACCOUNTING_CLOUD_CLIENT_ID}
MONEYBIRD_ACCOUNTING_CLOUD_CLIENT_SECRET: ${MONEYBIRD_ACCOUNTING_CLOUD_CLIENT_SECRET}
QUICKBOOKS_ACCOUNTING_CLOUD_CLIENT_ID: ${QUICKBOOKS_ACCOUNTING_CLOUD_CLIENT_ID}
QUICKBOOKS_ACCOUNTING_CLOUD_CLIENT_SECRET: ${QUICKBOOKS_ACCOUNTING_CLOUD_CLIENT_SECRET}
WAVE_FINANCIAL_ACCOUNTING_CLOUD_CLIENT_ID: ${WAVE_FINANCIAL_ACCOUNTING_CLOUD_CLIENT_ID}
WAVE_FINANCIAL_ACCOUNTING_CLOUD_CLIENT_SECRET: ${WAVE_FINANCIAL_ACCOUNTING_CLOUD_CLIENT_SECRET}









restart:
unless-stopped
ports:
Expand Down
27 changes: 27 additions & 0 deletions docker-compose.source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,33 @@ services:
AHA_TICKETING_CLIENT_ID: ${AHA_TICKETING_CLIENT_ID}
AHA_TICKETING_CLIENT_SECRET: ${AHA_TICKETING_CLIENT_SECRET}
AHA_TICKETING_SUBDOMAIN: ${AHA_TICKETING_SUBDOMAIN}
WRIKE_TICKETING_CLOUD_CLIENT_ID: ${WRIKE_TICKETING_CLOUD_CLIENT_ID}
WRIKE_TICKETING_CLOUD_CLIENT_SECRET: ${WRIKE_TICKETING_CLOUD_CLIENT_SECRET}
ASANA_TICKETING_CLOUD_CLIENT_ID: ${ASANA_TICKETING_CLOUD_CLIENT_ID}
ASANA_TICKETING_CLOUD_CLIENT_SECRET: ${ASANA_TICKETING_CLOUD_CLIENT_SECRET}
PENNYLANE_ACCOUNTING_CLOUD_CLIENT_ID: ${PENNYLANE_ACCOUNTING_CLOUD_CLIENT_ID}
PENNYLANE_ACCOUNTING_CLOUD_CLIENT_SECRET: ${PENNYLANE_ACCOUNTING_CLOUD_CLIENT_SECRET}
FRESHBOOKS_ACCOUNTING_CLOUD_CLIENT_ID: ${FRESHBOOKS_ACCOUNTING_CLOUD_CLIENT_ID}
FRESHBOOKS_ACCOUNTING_CLOUD_CLIENT_SECRET: ${FRESHBOOKS_ACCOUNTING_CLOUD_CLIENT_SECRET}
FREEAGENT_ACCOUNTING_CLOUD_CLIENT_ID: ${FREEAGENT_ACCOUNTING_CLOUD_CLIENT_ID}
FREEAGENT_ACCOUNTING_CLOUD_CLIENT_SECRET: ${FREEAGENT_ACCOUNTING_CLOUD_CLIENT_SECRET}
SAGE_ACCOUNTING_CLOUD_CLIENT_ID: ${SAGE_ACCOUNTING_CLOUD_CLIENT_ID}
SAGE_ACCOUNTING_CLOUD_CLIENT_SECRET: ${SAGE_ACCOUNTING_CLOUD_CLIENT_SECRET}
MONEYBIRD_ACCOUNTING_CLOUD_CLIENT_ID: ${MONEYBIRD_ACCOUNTING_CLOUD_CLIENT_ID}
MONEYBIRD_ACCOUNTING_CLOUD_CLIENT_SECRET: ${MONEYBIRD_ACCOUNTING_CLOUD_CLIENT_SECRET}
QUICKBOOKS_ACCOUNTING_CLOUD_CLIENT_ID: ${QUICKBOOKS_ACCOUNTING_CLOUD_CLIENT_ID}
QUICKBOOKS_ACCOUNTING_CLOUD_CLIENT_SECRET: ${QUICKBOOKS_ACCOUNTING_CLOUD_CLIENT_SECRET}
WAVE_FINANCIAL_ACCOUNTING_CLOUD_CLIENT_ID: ${WAVE_FINANCIAL_ACCOUNTING_CLOUD_CLIENT_ID}
WAVE_FINANCIAL_ACCOUNTING_CLOUD_CLIENT_SECRET: ${WAVE_FINANCIAL_ACCOUNTING_CLOUD_CLIENT_SECRET}









restart: unless-stopped
ports:
- 3000:3000
Expand Down
27 changes: 27 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,33 @@ services:
AHA_TICKETING_CLIENT_ID: ${AHA_TICKETING_CLIENT_ID}
AHA_TICKETING_CLIENT_SECRET: ${AHA_TICKETING_CLIENT_SECRET}
AHA_TICKETING_SUBDOMAIN: ${AHA_TICKETING_SUBDOMAIN}
WRIKE_TICKETING_CLOUD_CLIENT_ID: ${WRIKE_TICKETING_CLOUD_CLIENT_ID}
WRIKE_TICKETING_CLOUD_CLIENT_SECRET: ${WRIKE_TICKETING_CLOUD_CLIENT_SECRET}
ASANA_TICKETING_CLOUD_CLIENT_ID: ${ASANA_TICKETING_CLOUD_CLIENT_ID}
ASANA_TICKETING_CLOUD_CLIENT_SECRET: ${ASANA_TICKETING_CLOUD_CLIENT_SECRET}
PENNYLANE_ACCOUNTING_CLOUD_CLIENT_ID: ${PENNYLANE_ACCOUNTING_CLOUD_CLIENT_ID}
PENNYLANE_ACCOUNTING_CLOUD_CLIENT_SECRET: ${PENNYLANE_ACCOUNTING_CLOUD_CLIENT_SECRET}
FRESHBOOKS_ACCOUNTING_CLOUD_CLIENT_ID: ${FRESHBOOKS_ACCOUNTING_CLOUD_CLIENT_ID}
FRESHBOOKS_ACCOUNTING_CLOUD_CLIENT_SECRET: ${FRESHBOOKS_ACCOUNTING_CLOUD_CLIENT_SECRET}
FREEAGENT_ACCOUNTING_CLOUD_CLIENT_ID: ${FREEAGENT_ACCOUNTING_CLOUD_CLIENT_ID}
FREEAGENT_ACCOUNTING_CLOUD_CLIENT_SECRET: ${FREEAGENT_ACCOUNTING_CLOUD_CLIENT_SECRET}
SAGE_ACCOUNTING_CLOUD_CLIENT_ID: ${SAGE_ACCOUNTING_CLOUD_CLIENT_ID}
SAGE_ACCOUNTING_CLOUD_CLIENT_SECRET: ${SAGE_ACCOUNTING_CLOUD_CLIENT_SECRET}
MONEYBIRD_ACCOUNTING_CLOUD_CLIENT_ID: ${MONEYBIRD_ACCOUNTING_CLOUD_CLIENT_ID}
MONEYBIRD_ACCOUNTING_CLOUD_CLIENT_SECRET: ${MONEYBIRD_ACCOUNTING_CLOUD_CLIENT_SECRET}
QUICKBOOKS_ACCOUNTING_CLOUD_CLIENT_ID: ${QUICKBOOKS_ACCOUNTING_CLOUD_CLIENT_ID}
QUICKBOOKS_ACCOUNTING_CLOUD_CLIENT_SECRET: ${QUICKBOOKS_ACCOUNTING_CLOUD_CLIENT_SECRET}
WAVE_FINANCIAL_ACCOUNTING_CLOUD_CLIENT_ID: ${WAVE_FINANCIAL_ACCOUNTING_CLOUD_CLIENT_ID}
WAVE_FINANCIAL_ACCOUNTING_CLOUD_CLIENT_SECRET: ${WAVE_FINANCIAL_ACCOUNTING_CLOUD_CLIENT_SECRET}









restart:
unless-stopped
ports:
Expand Down
17 changes: 11 additions & 6 deletions docs/open-source/contributors.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,23 @@ We made a docker file that builds Panora from sources, specifically to help you
<Steps>


<Step title="Copy env variables">```bash cp .env.example .env ```</Step>
<Step title="Copy env variables">
```bash
cp .env.example .env
```
</Step>


<Step title="Removed previously installed dependencies">
```bash rm -rf node_modules .pnpm-store ./packages/api/dist
./packages/api/node_modules ./apps/webapp/node_modules
./apps/frontend_snippet/node_modules ```
```bash
rm -rf node_modules .pnpm-store ./packages/api/dist ./packages/api/node_modules ./apps/client-ts/node_modules ./apps/embedded-catalog/react/node_modules ./apps/magic-link/node_modules ./packages/shared/dist
```
</Step>

<Step title="Mac Users only:">
```bash echo -e "node-linker=hoisted\npackage-import-method=clone-or-copy" >
.npmrc ```
```bash
echo -e "node-linker=hoisted\npackage-import-method=clone-or-copy" > .npmrc
```
</Step>

<Step title="Start the Dockerfile">
Expand Down
26 changes: 14 additions & 12 deletions packages/api/scripts/oauthConnector.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import { LoggerService } from '@@core/logger/logger.service';
import { v4 as uuidv4 } from 'uuid';
import { EnvironmentService } from '@@core/environment/environment.service';
import { EncryptionService } from '@@core/encryption/encryption.service';
import {
import {
CallbackParams,
RefreshParams,
I${verticalUpper}ConnectionService,
Expand All @@ -56,7 +56,8 @@ import { ConnectionsStrategiesService } from '@@core/connections-strategies/conn
export type ${providerUpper}OAuthResponse = {
access_token: string;
refresh_token: string;
expires_at: string;
expires_in: string;
token_type: string;
};

@Injectable()
Expand Down Expand Up @@ -126,7 +127,7 @@ export class ${providerUpper}ConnectionService implements I${verticalUpper}Conne
refresh_token: this.cryptoService.encrypt(data.refresh_token),
account_url: "",
expiration_timestamp: new Date(
new Date().getTime() + Number(data.expires_at) * 1000,
new Date().getTime() + Number(data.expires_in) * 1000,
),
status: 'valid',
created_at: new Date(),
Expand All @@ -144,7 +145,7 @@ export class ${providerUpper}ConnectionService implements I${verticalUpper}Conne
access_token: this.cryptoService.encrypt(data.access_token),
refresh_token: this.cryptoService.encrypt(data.refresh_token),
expiration_timestamp: new Date(
new Date().getTime() + Number(data.expires_at) * 1000,
new Date().getTime() + Number(data.expires_in) * 1000,
),
status: 'valid',
created_at: new Date(),
Expand All @@ -165,15 +166,16 @@ export class ${providerUpper}ConnectionService implements I${verticalUpper}Conne

async handleTokenRefresh(opts: RefreshParams) {
try {
const { connectionId, refreshToken } = opts;
const formData = new URLSearchParams({
grant_type: 'refresh_token',
refresh_token: this.cryptoService.decrypt(refreshToken),
});
const { connectionId, refreshToken, projectId } = opts;
const CREDENTIALS = (await this.cService.getCredentials(
projectId,
this.type,
)) as OAuth2AuthData;

const formData = new URLSearchParams({
grant_type: 'refresh_token',
refresh_token: this.cryptoService.decrypt(refreshToken),
});

const res = await axios.post(
"",
Expand All @@ -198,7 +200,7 @@ export class ${providerUpper}ConnectionService implements I${verticalUpper}Conne
access_token: this.cryptoService.encrypt(data.access_token),
refresh_token: this.cryptoService.encrypt(data.refresh_token),
expiration_timestamp: new Date(
new Date().getTime() + Number(data.expires_at) * 1000,
new Date().getTime() + Number(data.expires_in) * 1000,
),
},
});
Expand Down Expand Up @@ -286,7 +288,7 @@ function addProviderToDockerCompose(provider, vertical, dockerComposePath) {

function handleUpdate(vertical, provider) {
createServiceFile(vertical, provider);
addProviderToEnvironmentService(provider, envServiceFilePath);
//addProviderToEnvironmentService(provider, envServiceFilePath);
for (const path of paths) {
addProviderToDockerCompose(provider, vertical, path);
}
Expand All @@ -298,7 +300,7 @@ if (import.meta.url === process.argv[1]) {
const vertical = args[0];
const provider = args[1];
createServiceFile(vertical, provider);
addProviderToEnvironmentService(provider, envServiceFilePath);
//addProviderToEnvironmentService(provider, envServiceFilePath);
for (const path of paths) {
addProviderToDockerCompose(argv.provider, path);
}
Expand Down
Loading
Loading