clerk / javascript

Official Javascript repository for Clerk authentication
https://clerk.com
MIT License
981 stars 221 forks source link

feat(elements): Infer base path #3557

Closed LekoArts closed 1 month ago

LekoArts commented 1 month ago

Description

The path prop on the <SignIn.Root> and <SignUp.Root> component is now automatically inferred. Previously, the default values were /sign-in and /sign-up, on other routes you had to explicitly define your route.

The new heuristic for determining the path where <SignIn.Root> and <SignUp.Root> are mounted is:

  1. path prop
  2. Automatically inferred
  3. If it can't be inferred, fallback to CLERK_SIGN_IN_URL and CLERK_SIGN_UP_URL env var
  4. Fallback to /sign-in and /sign-up

Fixes SDK-1791

Checklist

Type of change

changeset-bot[bot] commented 1 month ago

🦋 Changeset detected

Latest commit: 3567e146ab487d808db22750a7ee170ed42f15a0

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

This PR includes changesets to release 1 package | Name | Type | | --------------- | ----- | | @clerk/elements | Minor |

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