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

chore(backend): Enforce request param in authenticateRequest #2122

Merged
merged 5 commits into from
Nov 16, 2023

Conversation

dimkl
Copy link
Contributor

@dimkl dimkl commented Nov 13, 2023

Description

Changes:

  • drop options that can be retrieved from headers or cookies of request
  • enforce usage of request param
  • refactor types to fix the cyclic type dependency and allow separating the options passed in authenticateRequest from the options used internally

Checklist

  • npm test runs as expected.
  • npm run build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

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

Packages affected

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

@dimkl dimkl self-assigned this Nov 13, 2023
@dimkl dimkl requested a review from a team as a code owner November 13, 2023 16:07
Copy link

changeset-bot bot commented Nov 13, 2023

🦋 Changeset detected

Latest commit: eaa8e1b

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

This PR includes changesets to release 6 packages
Name Type
@clerk/backend Major
@clerk/fastify Patch
gatsby-plugin-clerk Patch
@clerk/nextjs Patch
@clerk/remix Patch
@clerk/clerk-sdk-node 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

@dimkl dimkl force-pushed the sdk-782-drop-deprecations-backend branch from 9be55f9 to 07edf5b Compare November 14, 2023 15:37
@dimkl dimkl force-pushed the sdk-784-enforce-request-param branch from a2ce60e to 4c80b1a Compare November 14, 2023 15:39
@dimkl dimkl requested a review from LekoArts November 14, 2023 15:40
@dimkl dimkl force-pushed the sdk-782-drop-deprecations-backend branch 3 times, most recently from 6b8d70b to 92bbeb9 Compare November 15, 2023 14:16
@dimkl dimkl force-pushed the sdk-782-drop-deprecations-backend branch from 92bbeb9 to 53bef9c Compare November 16, 2023 10:47
Base automatically changed from sdk-782-drop-deprecations-backend to main November 16, 2023 11:41
@dimkl dimkl force-pushed the sdk-784-enforce-request-param branch 2 times, most recently from d45a8e4 to 6e54944 Compare November 16, 2023 17:08
…pes dependencies

Instead of passing the `AuthenticateRequestOptions` down the dependency tree
`authenticateRequest => interstitialRule => AuthStatus => AuthObjects`, we
change the approach to bottom-up by definiting types per layer and importing them
to the parent layer. Also options of parent layers extend the options of child layers.
@dimkl dimkl force-pushed the sdk-784-enforce-request-param branch 2 times, most recently from b08abaa to 90a6ff9 Compare November 16, 2023 21:20
@dimkl dimkl force-pushed the sdk-784-enforce-request-param branch from 90a6ff9 to eaa8e1b Compare November 16, 2023 21:21
@dimkl dimkl added this pull request to the merge queue Nov 16, 2023
Merged via the queue into main with commit 9615e6c Nov 16, 2023
6 checks passed
@dimkl dimkl deleted the sdk-784-enforce-request-param branch November 16, 2023 21:49
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.

4 participants