From f21749512f5697f5be8437272c6aac806cf03d48 Mon Sep 17 00:00:00 2001 From: JiangShuuu Date: Thu, 16 Nov 2023 23:18:19 +0800 Subject: [PATCH] upd thirtparty --- .env.example | 16 ++++++++++++---- .github/workflows/main.yml | 4 ++-- docker/dockerfile | 1 + src/pages/api/auth/[...nextauth].ts | 5 +++++ 4 files changed, 20 insertions(+), 6 deletions(-) diff --git a/.env.example b/.env.example index b3cb19c..c9aebec 100644 --- a/.env.example +++ b/.env.example @@ -1,18 +1,26 @@ DATABASE_URL= +# https://uploadthing.com/ UPLOADTHING_SECRET= UPLOADTHING_APP_ID= + +# https://app.pinecone.io/organizations/-NijBscbfRwV4V0URFzy/projects/gcp-starter:5d72bfc/indexes PINECONE_API_KEY= +# https://platform.openai.com/api-keys OPENAI_API_KEY= +# https://dashboard.stripe.com/test/apikeys +# https://stripe.com/docs/testing STRIPE_PRODUCT_ID= STRIPE_SECRET_KEY= STRIPE_WEBHOOK_SECRET= -GITHUB_ID= -GITHUB_SECRET= +THIRT_GITHUB_ID= +THIRT_GITHUB_SECRET= GOOGLE_CLIENT_ID= GOOGLE_CLIENT_SECRET= -BASE_URL= -NEXTAUTH_URL= \ No newline at end of file +# https://next-auth.js.org/adapters +NEXTAUTH_SECRET= +NEXTAUTH_URL= +NEXT_PUBLIC_BASE_URL= \ No newline at end of file diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3e3d12d..776f9ae 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,8 +22,8 @@ jobs: echo STRIPE_PRODUCT_ID=${{ secrets.STRIPE_PRODUCT_ID }} >> .env echo STRIPE_SECRET_KEY=${{ secrets.STRIPE_SECRET_KEY }} >> .env echo STRIPE_WEBHOOK_SECRET=${{ secrets.STRIPE_WEBHOOK_SECRET }} >> .env - echo THIRT_GITHUB_ID=${{ secrets.GITHUB_ID }} >> .env - echo THIRT_GITHUB_SECRET=${{ secrets.GITHUB_SECRET }} >> .env + echo THIRT_GITHUB_ID=${{ secrets.THIRT_GITHUB_ID }} >> .env + echo THIRT_GITHUB_SECRET=${{ secrets.THIRT_GITHUB_SECRET }} >> .env echo GOOGLE_CLIENT_ID=${{ secrets.GOOGLE_CLIENT_ID }} >> .env echo GOOGLE_CLIENT_SECRET=${{ secrets.GOOGLE_CLIENT_SECRET }} >> .env echo NEXT_PUBLIC_BASE_URL=${{ secrets.NEXT_PUBLIC_BASE_URL }} >> .env diff --git a/docker/dockerfile b/docker/dockerfile index bf3668d..d993ea3 100644 --- a/docker/dockerfile +++ b/docker/dockerfile @@ -37,6 +37,7 @@ FROM base AS runner WORKDIR /app ENV NODE_ENV production +ENV NEXT_SHARP_PATH /tmp/node_modules/sharp # Uncomment the following line in case you want to disable telemetry during runtime. # ENV NEXT_TELEMETRY_DISABLED 1 diff --git a/src/pages/api/auth/[...nextauth].ts b/src/pages/api/auth/[...nextauth].ts index 94f4753..6c5a9f6 100644 --- a/src/pages/api/auth/[...nextauth].ts +++ b/src/pages/api/auth/[...nextauth].ts @@ -28,6 +28,11 @@ export const authOptions: AuthOptions = { throw new Error('Invalid credentials') } + console.log('ENV_TEST_GIT', process.env.THIRT_GITHUB_ID) + console.log('ENV_TEST_GIT', process.env.THIRT_GITHUB_SECRET) + console.log('ENV_TEST_GOOGLE', process.env.GOOGLE_CLIENT_ID) + console.log('ENV_TEST_GOOGLE', process.env.GOOGLE_CLIENT_SECRET) + const user = await db.user.findUnique({ where: { email: credentials.email