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

Use CLERK_TRUST_HOST by default #1492

Merged
merged 11 commits into from Jul 20, 2023
Merged

Use CLERK_TRUST_HOST by default #1492

merged 11 commits into from Jul 20, 2023

Conversation

dimkl
Copy link
Member

@dimkl dimkl commented Jul 17, 2023

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

Packages affected

  • @clerk/clerk-js
  • @clerk/clerk-react
  • @clerk/nextjs
  • @clerk/remix
  • @clerk/types
  • @clerk/themes
  • @clerk/localizations
  • @clerk/clerk-expo
  • @clerk/backend
  • @clerk/clerk-sdk-node
  • @clerk/shared
  • @clerk/fastify
  • @clerk/chrome-extension
  • gatsby-plugin-clerk
  • build/tooling/chore

Description

  • npm test runs as expected.
  • npm run build runs as expected.

@dimkl dimkl self-assigned this Jul 17, 2023
@dimkl dimkl requested a review from nikosdouvlis as a code owner July 17, 2023 15:22
@changeset-bot
Copy link

changeset-bot bot commented Jul 17, 2023

🦋 Changeset detected

Latest commit: 874c165

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
@clerk/clerk-sdk-node Minor
@clerk/backend Minor
@clerk/nextjs Minor
@clerk/remix Minor
gatsby-plugin-clerk Patch
@clerk/fastify Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

@jit-ci jit-ci bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Great news! Jit hasn't found any security issues in your PR. Good Job! 🏆

@dimkl dimkl changed the title [WIP] Use CLETK_TRUST_HOST by default [WIP] Use CLERK_TRUST_HOST by default Jul 18, 2023
packages/nextjs/src/server/clerkClient.ts Outdated Show resolved Hide resolved
packages/backend/src/utils.ts Show resolved Hide resolved
@dimkl dimkl changed the title [WIP] Use CLERK_TRUST_HOST by default Use CLERK_TRUST_HOST by default Jul 19, 2023

// TODO: replace Request type with runtime.Request
// import type runtime from './runtime';
// type Request = typeof runtime.Request
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After some discussion with @anagstef we have decided that I will remove these comments and keep the Request type in the code below.
@nikosdouvlis should we proceed with that?

@dimkl dimkl force-pushed the js-513-clerk-trust-host branch 2 times, most recently from 4d7221c to 01e99a4 Compare July 19, 2023 15:28
});
afterAll(() => {
global.console.warn = consoleWarn;
});
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have disabled the console.warn from authMiddleware.test.ts test to reduce the noise in our test results
cc: @nikosdouvlis , @anagstef

@dimkl
Copy link
Member Author

dimkl commented Jul 20, 2023

!snapshot

@clerk-cookie
Copy link
Collaborator

Hey @dimkl - the snapshot version command generated the following package versions:

Package Version
@clerk/backend 0.26.0-snapshot.b5f1337
@clerk/chrome-extension 0.3.23
@clerk/clerk-js 4.54.0
eslint-config-custom 0.3.0
@clerk/clerk-expo 0.18.14
@clerk/fastify 0.6.2-snapshot.b5f1337
gatsby-plugin-clerk 4.4.2-snapshot.b5f1337
@clerk/localizations 1.23.1
@clerk/nextjs 4.23.0-snapshot.b5f1337
@clerk/clerk-react 4.23.0
@clerk/remix 2.9.0-snapshot.b5f1337
@clerk/clerk-sdk-node 4.12.0-snapshot.b5f1337
@clerk/shared 0.20.0
@clerk/themes 1.7.5
@clerk/types 3.48.0

Tip: use the snippet copy button below to quickly install the required packages.

# @clerk/backend
npm i @clerk/backend@0.26.0-snapshot.b5f1337
# @clerk/chrome-extension
npm i @clerk/chrome-extension@0.3.23
# @clerk/clerk-js
npm i @clerk/clerk-js@4.54.0
# eslint-config-custom
npm i eslint-config-custom@0.3.0
# @clerk/clerk-expo
npm i @clerk/clerk-expo@0.18.14
# @clerk/fastify
npm i @clerk/fastify@0.6.2-snapshot.b5f1337
# gatsby-plugin-clerk
npm i gatsby-plugin-clerk@4.4.2-snapshot.b5f1337
# @clerk/localizations
npm i @clerk/localizations@1.23.1
# @clerk/nextjs
npm i @clerk/nextjs@4.23.0-snapshot.b5f1337
# @clerk/clerk-react
npm i @clerk/clerk-react@4.23.0
# @clerk/remix
npm i @clerk/remix@2.9.0-snapshot.b5f1337
# @clerk/clerk-sdk-node
npm i @clerk/clerk-sdk-node@4.12.0-snapshot.b5f1337
# @clerk/shared
npm i @clerk/shared@0.20.0
# @clerk/themes
npm i @clerk/themes@1.7.5
# @clerk/types
npm i @clerk/types@3.48.0

The buildRequestUrl utility will be used to construct the
request url using a request and optional path parameter
(used to overrided the path of the request url).
This utility will use the forwarded headers values and the
request.url to generate and return the actual request URL
@nikosdouvlis nikosdouvlis merged commit 4ff4b71 into main Jul 20, 2023
9 checks passed
@nikosdouvlis nikosdouvlis deleted the js-513-clerk-trust-host branch July 20, 2023 14:04
@clerk-cookie clerk-cookie mentioned this pull request Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants