From d44fa3f408799e4840be6a43cf2266246f997daa Mon Sep 17 00:00:00 2001 From: Mark Wentowski Date: Thu, 21 Mar 2024 09:45:46 -0500 Subject: [PATCH] fix: replaced auth module with apps module in CORS setup andfixed an import statement --- v2/emailpassword/nestjs/guide.mdx | 6 +++--- v2/passwordless/nestjs/guide.mdx | 6 +++--- v2/thirdparty/nestjs/guide.mdx | 6 +++--- v2/thirdpartyemailpassword/nestjs/guide.mdx | 6 +++--- v2/thirdpartypasswordless/nestjs/guide.mdx | 6 +++--- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/v2/emailpassword/nestjs/guide.mdx b/v2/emailpassword/nestjs/guide.mdx index 69c84c98d..9ee3efbee 100644 --- a/v2/emailpassword/nestjs/guide.mdx +++ b/v2/emailpassword/nestjs/guide.mdx @@ -67,7 +67,7 @@ import { Module } from '@nestjs/common'; import { SupertokensService } from './supertokens/supertokens.service'; import { MiddlewareConsumer, NestModule, DynamicModule } from '@nestjs/common'; // @ts-ignore -import { AuthMiddleware } from './auth/auth.middleware'; +import { AuthMiddleware } from './auth.middleware'; // @ts-ignore import { ConfigInjectionToken, AuthModuleConfig } from './config.interface'; @@ -243,10 +243,10 @@ Enable and update your CORS settings in `main.ts`: import { NestFactory } from '@nestjs/core'; import supertokens from 'supertokens-node'; // @ts-ignore -import { AuthModule } from './app.module'; +import { AppModule } from './app.module'; async function bootstrap() { - const app = await NestFactory.create(AuthModule); + const app = await NestFactory.create(AppModule); //highlight-start app.enableCors({ origin: ['^{form_websiteDomain}'], diff --git a/v2/passwordless/nestjs/guide.mdx b/v2/passwordless/nestjs/guide.mdx index 997d73244..b298b47f2 100644 --- a/v2/passwordless/nestjs/guide.mdx +++ b/v2/passwordless/nestjs/guide.mdx @@ -67,7 +67,7 @@ import { Module } from '@nestjs/common'; import { SupertokensService } from './supertokens/supertokens.service'; import { MiddlewareConsumer, NestModule, DynamicModule } from '@nestjs/common'; // @ts-ignore -import { AuthMiddleware } from './auth/auth.middleware'; +import { AuthMiddleware } from './auth.middleware'; // @ts-ignore import { ConfigInjectionToken, AuthModuleConfig } from './config.interface'; @@ -262,10 +262,10 @@ Enable and update your CORS settings in `main.ts`: import { NestFactory } from '@nestjs/core'; import supertokens from 'supertokens-node'; // @ts-ignore -import { AuthModule } from './app.module'; +import { AppModule } from './app.module'; async function bootstrap() { - const app = await NestFactory.create(AuthModule); + const app = await NestFactory.create(AppModule); //highlight-start app.enableCors({ origin: ['^{form_websiteDomain}'], diff --git a/v2/thirdparty/nestjs/guide.mdx b/v2/thirdparty/nestjs/guide.mdx index 7836231c3..4df35f871 100644 --- a/v2/thirdparty/nestjs/guide.mdx +++ b/v2/thirdparty/nestjs/guide.mdx @@ -65,7 +65,7 @@ import { Module } from '@nestjs/common'; import { SupertokensService } from './supertokens/supertokens.service'; import { MiddlewareConsumer, NestModule, DynamicModule } from '@nestjs/common'; // @ts-ignore -import { AuthMiddleware } from './auth/auth.middleware'; +import { AuthMiddleware } from './auth.middleware'; // @ts-ignore import { ConfigInjectionToken, AuthModuleConfig } from './config.interface'; @@ -320,10 +320,10 @@ Enable and update your CORS settings in `main.ts`: import { NestFactory } from '@nestjs/core'; import supertokens from 'supertokens-node'; // @ts-ignore -import { AuthModule } from './app.module'; +import { AppModule } from './app.module'; async function bootstrap() { - const app = await NestFactory.create(AuthModule); + const app = await NestFactory.create(AppModule); //highlight-start app.enableCors({ origin: ['^{form_websiteDomain}'], diff --git a/v2/thirdpartyemailpassword/nestjs/guide.mdx b/v2/thirdpartyemailpassword/nestjs/guide.mdx index 115b08e4a..37979bacb 100644 --- a/v2/thirdpartyemailpassword/nestjs/guide.mdx +++ b/v2/thirdpartyemailpassword/nestjs/guide.mdx @@ -65,7 +65,7 @@ import { Module } from '@nestjs/common'; import { SupertokensService } from './supertokens/supertokens.service'; import { MiddlewareConsumer, NestModule, DynamicModule } from '@nestjs/common'; // @ts-ignore -import { AuthMiddleware } from './auth/auth.middleware'; +import { AuthMiddleware } from './auth.middleware'; // @ts-ignore import { ConfigInjectionToken, AuthModuleConfig } from './config.interface'; @@ -318,10 +318,10 @@ Enable and update your CORS settings in `main.ts`: import { NestFactory } from '@nestjs/core'; import supertokens from 'supertokens-node'; // @ts-ignore -import { AuthModule } from './app.module'; +import { AppModule } from './app.module'; async function bootstrap() { - const app = await NestFactory.create(AuthModule); + const app = await NestFactory.create(AppModule); //highlight-start app.enableCors({ origin: ['^{form_websiteDomain}'], diff --git a/v2/thirdpartypasswordless/nestjs/guide.mdx b/v2/thirdpartypasswordless/nestjs/guide.mdx index f29fb3cc4..793838cf0 100644 --- a/v2/thirdpartypasswordless/nestjs/guide.mdx +++ b/v2/thirdpartypasswordless/nestjs/guide.mdx @@ -67,7 +67,7 @@ import { Module } from '@nestjs/common'; import { SupertokensService } from './supertokens/supertokens.service'; import { MiddlewareConsumer, NestModule, DynamicModule } from '@nestjs/common'; // @ts-ignore -import { AuthMiddleware } from './auth/auth.middleware'; +import { AuthMiddleware } from './auth.middleware'; // @ts-ignore import { ConfigInjectionToken, AuthModuleConfig } from './config.interface'; @@ -262,10 +262,10 @@ Enable and update your CORS settings in `main.ts`: import { NestFactory } from '@nestjs/core'; import supertokens from 'supertokens-node'; // @ts-ignore -import { AuthModule } from './app.module'; +import { AppModule } from './app.module'; async function bootstrap() { - const app = await NestFactory.create(AuthModule); + const app = await NestFactory.create(AppModule); //highlight-start app.enableCors({ origin: ['^{form_websiteDomain}'],