Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/nextjs-export-handle-sso-callback.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@clerk/nextjs': patch
---

Export `<HandleSSOCallback />` from `@clerk/nextjs`. Previously, importing it from `@clerk/nextjs` failed, so it could not be used on the SSO callback route of a custom flow.
64 changes: 64 additions & 0 deletions packages/nextjs/src/__tests__/__snapshots__/exports.test.ts.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`root public exports > should not change unexpectedly 1`] = `
[
"APIKeys",
"AuthenticateWithRedirectCallback",
"ClerkDegraded",
"ClerkFailed",
"ClerkLoaded",
"ClerkLoading",
"ClerkProvider",
"CreateOrganization",
"GoogleOneTap",
"HandleSSOCallback",
"InviteMembersButton",
"OAuthConsent",
"OAuthDeviceVerification",
"OrganizationList",
"OrganizationProfile",
"OrganizationSwitcher",
"PricingTable",
"Protect",
"RedirectToCreateOrganization",
"RedirectToOrganizationProfile",
"RedirectToSignIn",
"RedirectToSignUp",
"RedirectToTasks",
"RedirectToUserProfile",
"Show",
"SignIn",
"SignInButton",
"SignInWithMetamaskButton",
"SignOutButton",
"SignUp",
"SignUpButton",
"SignedIn",
"SignedOut",
"TaskChooseOrganization",
"TaskResetPassword",
"TaskSetupMFA",
"UNSAFE_PortalProvider",
"UserAvatar",
"UserButton",
"UserProfile",
"Waitlist",
"getToken",
"useAPIKeys",
"useAuth",
"useClerk",
"useEmailLink",
"useOAuthConsent",
"useOAuthDeviceVerification",
"useOrganization",
"useOrganizationCreationDefaults",
"useOrganizationList",
"useReverification",
"useSession",
"useSessionList",
"useSignIn",
"useSignUp",
"useUser",
"useWaitlist",
]
`;
9 changes: 9 additions & 0 deletions packages/nextjs/src/__tests__/exports.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { describe, expect, it } from 'vitest';

import * as publicExports from '../index';

describe('root public exports', () => {
it('should not change unexpectedly', () => {
Comment thread
coderabbitai[bot] marked this conversation as resolved.
expect(Object.keys(publicExports).sort()).toMatchSnapshot();
});
});
1 change: 1 addition & 0 deletions packages/nextjs/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export {
APIKeys,
CreateOrganization,
GoogleOneTap,
HandleSSOCallback,
InviteMembersButton,
OAuthConsent,
OAuthDeviceVerification,
Expand Down
7 changes: 7 additions & 0 deletions packages/nextjs/vitest.config.mts
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
import { fileURLToPath } from 'node:url';

import { defineConfig } from 'vitest/config';

export default defineConfig({
plugins: [],
resolve: {
alias: {
'#components': fileURLToPath(new URL('./src/components.client.ts', import.meta.url)),
},
},
test: {
typecheck: {
enabled: true,
Expand Down
Loading