@clerk/upgrade 1.0.3 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Upgrading to Clerk Core 2
|
|
2
2
|
|
|
3
|
-
In
|
|
3
|
+
In April 2024, we updated Clerk's SDKs to include Core 2. This new core includes:
|
|
4
4
|
|
|
5
5
|
- 💅 Redesigned and improved component UIs.
|
|
6
6
|
- 🔪 The 401 & "flash of white page" that was visible sometimes when syncing auth state was eliminated.
|
|
@@ -12,14 +12,14 @@ In Febrary 2024, [we updated](https://clerk.com/changelog/2024-01-16) Clerk's SD
|
|
|
12
12
|
Core 2 brings both UI changes and breaking code changes, so each SDK has been updated to a new major version.
|
|
13
13
|
We expect upgrades to take less than 30 minutes, and are providing a CLI tool to assist with the process. Please select your SDK below to get started:
|
|
14
14
|
|
|
15
|
-
- [Next.js](/nextjs)
|
|
16
|
-
- [Remix](/remix)
|
|
17
|
-
- [Expo](/expo)
|
|
18
|
-
- [Node](/node)
|
|
19
|
-
- [Fastify](/fastify)
|
|
20
|
-
- [React](/react)
|
|
21
|
-
- [Backend](/backend)
|
|
22
|
-
- [JS](/
|
|
23
|
-
- [Chrome Extension](/chrome-extension)
|
|
15
|
+
- [Next.js](/docs/upgrade-guides/core-2/nextjs)
|
|
16
|
+
- [Remix](/docs/upgrade-guides/core-2/remix)
|
|
17
|
+
- [Expo](/docs/upgrade-guides/core-2/expo)
|
|
18
|
+
- [Node](/docs/upgrade-guides/core-2/node)
|
|
19
|
+
- [Fastify](/docs/upgrade-guides/core-2/fastify)
|
|
20
|
+
- [React](/docs/upgrade-guides/core-2/react)
|
|
21
|
+
- [Backend](/docs/upgrade-guides/core-2/backend)
|
|
22
|
+
- [JS](/docs/upgrade-guides/core-2/javascript)
|
|
23
|
+
- [Chrome Extension](/docs/upgrade-guides/core-2/chrome-extension)
|
|
24
24
|
|
|
25
|
-
Note that the `
|
|
25
|
+
Note that the `Gatsby`, `Go`, and `Ruby` SDKs do not yet have a Core 2 release ready - if you are using any of these SDKs there is nothing actionable right now.
|
|
@@ -30,6 +30,6 @@ All `afterSignXUrl` props and `CLERK_AFTER_SIGN_X_URL` environment variables hav
|
|
|
30
30
|
If neither value is set, Clerk will redirect to the `redirect_url` if present, otherwise it will redirect to `/`. If you'd like to retain the current behavior of your app without any changes, you can switch `afterSignXUrl` with `signXFallbackRedirectUrl` as such:
|
|
31
31
|
|
|
32
32
|
```diff
|
|
33
|
-
- <SignIn afterSignInUrl='/foo' />
|
|
34
|
-
+ <SignIn
|
|
33
|
+
- <SignIn afterSignInUrl='/foo' afterSignUpUrl='/bar' />
|
|
34
|
+
+ <SignIn fallbackRedirectUrl='/foo' signUpFallbackRedirectUrl='/bar' />
|
|
35
35
|
```
|
|
@@ -22,7 +22,7 @@ export default authMiddleware({
|
|
|
22
22
|
});
|
|
23
23
|
|
|
24
24
|
export const config = {
|
|
25
|
-
matcher: ['/((?!.+\\.[\\w]+$|_next)
|
|
25
|
+
matcher: ['/((?!.+\\.[\\w]+$|_next).*)', '/', '/(api|trpc)(.*)'],
|
|
26
26
|
};
|
|
27
27
|
```
|
|
28
28
|
|
|
@@ -45,6 +45,6 @@ export default clerkMiddleware((auth, request) => {
|
|
|
45
45
|
});
|
|
46
46
|
|
|
47
47
|
export const config = {
|
|
48
|
-
matcher: ['/((
|
|
48
|
+
matcher: ['/((?!.*\\..*|_next).*)', '/', '/(api|trpc)(.*)'],
|
|
49
49
|
};
|
|
50
50
|
```
|