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: add external oauth module #4067

Merged
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
3 changes: 3 additions & 0 deletions apps/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@
"tsconfig-paths": "~4.1.0",
"typescript": "4.9.5"
},
"optionalDependencies": {
"@novu/ee-auth": "^0.18.0"
},
"lint-staged": {
"*.{js,jsx,ts,tsx}": [
"eslint"
Expand Down
14 changes: 14 additions & 0 deletions apps/api/src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ import { InboundParseModule } from './app/inbound-parse/inbound-parse.module';
import { BlueprintModule } from './app/blueprint/blueprint.module';
import { TenantModule } from './app/tenant/tenant.module';

const enterpriseImport = (path: string): any | undefined => {
if (process.env.NOVU_MANAGED_SERVICE === 'true') {
return require(path);
}

return undefined;
};

const modules: Array<Type | DynamicModule | Promise<DynamicModule> | ForwardReference> = [
InboundParseModule,
OrganizationModule,
Expand Down Expand Up @@ -61,6 +69,12 @@ const modules: Array<Type | DynamicModule | Promise<DynamicModule> | ForwardRefe
TenantModule,
];

const eeAuthModule = enterpriseImport('@novu/ee-auth');

if (eeAuthModule) {
modules.push(eeAuthModule);
}

const providers: Provider[] = [];

if (process.env.SENTRY_DSN) {
Expand Down
Loading