diff --git a/packages/clerk-js/src/core/clerk.ts b/packages/clerk-js/src/core/clerk.ts index 3d8f36ad320..3bb8aa2cb3a 100644 --- a/packages/clerk-js/src/core/clerk.ts +++ b/packages/clerk-js/src/core/clerk.ts @@ -1,6 +1,5 @@ import { inBrowser as inClientSide, isValidBrowserOnline } from '@clerk/shared/browser'; import { clerkEvents, createClerkEventBus } from '@clerk/shared/clerkEventBus'; -import { deprecated } from '@clerk/shared/deprecated'; import { ClerkRuntimeError, EmailLinkError, @@ -1277,7 +1276,7 @@ export class Clerk implements ClerkInterface { * `setActive` can be used to set the active session and/or organization. */ public setActive = async (params: SetActiveParams): Promise => { - const { organization, beforeEmit, redirectUrl, navigate: setActiveNavigate } = params; + const { organization, redirectUrl, navigate: setActiveNavigate } = params; let { session } = params; this.__internal_setActiveInProgress = true; debugLogger.debug( @@ -1375,29 +1374,15 @@ export class Clerk implements ClerkInterface { eventBus.emit(events.TokenUpdate, { token: null }); } - //2. If there's a beforeEmit, typically we're navigating. Emit the session as - // undefined, then wait for beforeEmit to complete before emitting the new session. - // When undefined, neither SignedIn nor SignedOut renders, which avoids flickers or - // automatic reloading when reloading shouldn't be happening. + //2. Handle navigation with redirectUrl or setActiveNavigate const tracker = createBeforeUnloadTracker(this.#options.standardBrowser); - if (beforeEmit) { - deprecated( - 'Clerk.setActive({beforeEmit})', - 'Use the `redirectUrl` property instead. Example `Clerk.setActive({redirectUrl:"/"})`', - ); - await tracker.track(async () => { - this.#setTransitiveState(); - await beforeEmit(newSession); - }); - } - const taskUrl = newSession?.status === 'pending' && newSession?.currentTask && this.#options.taskUrls?.[newSession?.currentTask.key]; - if (!beforeEmit && (redirectUrl || taskUrl || setActiveNavigate)) { + if (redirectUrl || taskUrl || setActiveNavigate) { await tracker.track(async () => { if (!this.client) { // Typescript is not happy because since thinks this.client might have changed to undefined because the function is asynchronous. @@ -1544,7 +1529,9 @@ export class Clerk implements ClerkInterface { public buildSignInUrl(options?: SignInRedirectOptions): string { return this.#buildUrl( 'signInUrl', - { ...options, redirectUrl: options?.redirectUrl || window.location.href }, + { ...options, redirectUrl: options?.redirectUrl || window.location.href } as RedirectOptions & { + redirectUrl?: string; + }, options?.initialValues, ); } @@ -1552,7 +1539,9 @@ export class Clerk implements ClerkInterface { public buildSignUpUrl(options?: SignUpRedirectOptions): string { return this.#buildUrl( 'signUpUrl', - { ...options, redirectUrl: options?.redirectUrl || window.location.href }, + { ...options, redirectUrl: options?.redirectUrl || window.location.href } as RedirectOptions & { + redirectUrl?: string; + }, options?.initialValues, ); } @@ -2874,7 +2863,7 @@ export class Clerk implements ClerkInterface { #buildUrl = ( key: 'signInUrl' | 'signUpUrl', - options: RedirectOptions, + options: RedirectOptions & { redirectUrl?: string }, _initValues?: Record, ): string => { if (!key || !this.loaded || !this.environment || !this.environment.displayConfig) { diff --git a/packages/clerk-js/src/core/resources/User.ts b/packages/clerk-js/src/core/resources/User.ts index 61fa366324c..0da57f29ca7 100644 --- a/packages/clerk-js/src/core/resources/User.ts +++ b/packages/clerk-js/src/core/resources/User.ts @@ -19,7 +19,6 @@ import type { PasskeyResource, PhoneNumberResource, RemoveUserPasswordParams, - SamlAccountResource, SetProfileImageParams, TOTPJSON, TOTPResource, @@ -49,7 +48,6 @@ import { OrganizationSuggestion, Passkey, PhoneNumber, - SamlAccount, SessionWithActivities, TOTP, UserOrganizationInvitation, @@ -69,8 +67,6 @@ export class User extends BaseResource implements UserResource { enterpriseAccounts: EnterpriseAccountResource[] = []; passkeys: PasskeyResource[] = []; - samlAccounts: SamlAccountResource[] = []; - organizationMemberships: OrganizationMembershipResource[] = []; passwordEnabled = false; firstName: string | null = null; @@ -365,8 +361,6 @@ export class User extends BaseResource implements UserResource { this.organizationMemberships = (data.organization_memberships || []).map(om => new OrganizationMembership(om)); - this.samlAccounts = (data.saml_accounts || []).map(sa => new SamlAccount(sa, this.path() + '/saml_accounts')); - this.enterpriseAccounts = (data.enterprise_accounts || []).map( ea => new EnterpriseAccount(ea, this.path() + '/enterprise_accounts'), ); @@ -413,7 +407,6 @@ export class User extends BaseResource implements UserResource { external_accounts: this.externalAccounts.map(ea => ea.__internal_toSnapshot()), passkeys: this.passkeys.map(passkey => passkey.__internal_toSnapshot()), organization_memberships: this.organizationMemberships.map(om => om.__internal_toSnapshot()), - saml_accounts: this.samlAccounts.map(sa => sa.__internal_toSnapshot()), enterprise_accounts: this.enterpriseAccounts.map(ea => ea.__internal_toSnapshot()), totp_enabled: this.totpEnabled, backup_code_enabled: this.backupCodeEnabled, diff --git a/packages/clerk-js/src/ui/components/CreateOrganization/CreateOrganizationPage.tsx b/packages/clerk-js/src/ui/components/CreateOrganization/CreateOrganizationPage.tsx index bb4c6e75720..a27e66ba87f 100644 --- a/packages/clerk-js/src/ui/components/CreateOrganization/CreateOrganizationPage.tsx +++ b/packages/clerk-js/src/ui/components/CreateOrganization/CreateOrganizationPage.tsx @@ -11,7 +11,7 @@ import { CreateOrganizationForm } from './CreateOrganizationForm'; export const CreateOrganizationPage = withCardStateProvider(() => { const { closeCreateOrganization } = useClerk(); - const { mode, navigateAfterCreateOrganization, skipInvitationScreen, hideSlug } = useCreateOrganizationContext(); + const { mode, navigateAfterCreateOrganization, skipInvitationScreen } = useCreateOrganizationContext(); const card = useCardState(); const { showDevModeNotice } = useDevMode(); @@ -33,7 +33,6 @@ export const CreateOrganizationPage = withCardStateProvider(() => { closeCreateOrganization(); } }} - hideSlug={hideSlug} /> diff --git a/packages/clerk-js/src/ui/components/OrganizationSwitcher/OrganizationSwitcherPopover.tsx b/packages/clerk-js/src/ui/components/OrganizationSwitcher/OrganizationSwitcherPopover.tsx index 10e5df31ca7..4e3dcca64f4 100644 --- a/packages/clerk-js/src/ui/components/OrganizationSwitcher/OrganizationSwitcherPopover.tsx +++ b/packages/clerk-js/src/ui/components/OrganizationSwitcher/OrganizationSwitcherPopover.tsx @@ -49,7 +49,6 @@ export const OrganizationSwitcherPopover = React.forwardRef { diff --git a/packages/clerk-js/src/ui/contexts/components/CreateOrganization.ts b/packages/clerk-js/src/ui/contexts/components/CreateOrganization.ts index 32d4f13c69f..2ed14e694ab 100644 --- a/packages/clerk-js/src/ui/contexts/components/CreateOrganization.ts +++ b/packages/clerk-js/src/ui/contexts/components/CreateOrganization.ts @@ -38,7 +38,6 @@ export const useCreateOrganizationContext = () => { return { ...ctx, skipInvitationScreen: ctx.skipInvitationScreen || false, - hideSlug: ctx.hideSlug || false, navigateAfterCreateOrganization, componentName, }; diff --git a/packages/clerk-js/src/ui/contexts/components/UserButton.ts b/packages/clerk-js/src/ui/contexts/components/UserButton.ts index 0ac80564a0a..779ca61f3a9 100644 --- a/packages/clerk-js/src/ui/contexts/components/UserButton.ts +++ b/packages/clerk-js/src/ui/contexts/components/UserButton.ts @@ -1,4 +1,3 @@ -import { deprecatedObjectProperty } from '@clerk/shared/deprecated'; import { useClerk } from '@clerk/shared/react'; import { createContext, useContext, useMemo } from 'react'; @@ -26,22 +25,10 @@ export const useUserButtonContext = () => { const signInUrl = ctx.signInUrl || options.signInUrl || displayConfig.signInUrl; const userProfileUrl = ctx.userProfileUrl || displayConfig.userProfileUrl; - if (ctx.afterSignOutUrl) { - deprecatedObjectProperty(ctx, 'afterSignOutUrl', `Move 'afterSignOutUrl' to '`); - } - - const afterSignOutUrl = ctx.afterSignOutUrl || clerk.buildAfterSignOutUrl(); + const afterSignOutUrl = clerk.buildAfterSignOutUrl(); const navigateAfterSignOut = () => navigate(afterSignOutUrl); - if (ctx.afterSignOutUrl) { - deprecatedObjectProperty( - ctx, - 'afterMultiSessionSingleSignOutUrl', - `Move 'afterMultiSessionSingleSignOutUrl' to '`, - ); - } - const afterMultiSessionSingleSignOutUrl = - ctx.afterMultiSessionSingleSignOutUrl || clerk.buildAfterMultiSessionSingleSignOutUrl(); + const afterMultiSessionSingleSignOutUrl = clerk.buildAfterMultiSessionSingleSignOutUrl(); const navigateAfterMultiSessionSingleSignOut = () => clerk.redirectWithAuth(afterMultiSessionSingleSignOutUrl); const afterSwitchSessionUrl = ctx.afterSwitchSessionUrl || displayConfig.afterSwitchSessionUrl; diff --git a/packages/clerk-js/src/utils/assertNoLegacyProp.ts b/packages/clerk-js/src/utils/assertNoLegacyProp.ts index a574b8d9e2f..6eda5f93c48 100644 --- a/packages/clerk-js/src/utils/assertNoLegacyProp.ts +++ b/packages/clerk-js/src/utils/assertNoLegacyProp.ts @@ -1,25 +1,10 @@ -import { logger } from '@clerk/shared/logger'; - export function assertNoLegacyProp(props: Record) { const legacyProps = ['redirectUrl', 'afterSignInUrl', 'afterSignUpUrl', 'after_sign_in_url', 'after_sign_up_url']; const legacyProp = Object.keys(props).find(key => legacyProps.includes(key)); if (legacyProp && props[legacyProp]) { - logger.warnOnce( - `Clerk: The prop "${legacyProp}" is deprecated and should be replaced with the new "fallbackRedirectUrl" or "forceRedirectUrl" props instead. Learn more: https://clerk.com/docs/guides/custom-redirects#redirect-url-props`, - ); - } -} - -export function warnForNewPropShadowingLegacyProp( - newKey: string | undefined, - newValue: string | undefined | null, - legacyKey: string | undefined, - legacyValue: string | undefined | null, -) { - if (newValue && legacyValue) { - logger.warnOnce( - `Clerk: The "${newKey}" prop ("${newValue}") has priority over the legacy "${legacyKey}" (or "redirectUrl") ("${legacyValue}"), which will be completely ignored in this case. "${legacyKey}" (or "redirectUrl" prop) should be replaced with the new "fallbackRedirectUrl" or "forceRedirectUrl" props instead. Learn more: https://clerk.com/docs/guides/custom-redirects#redirect-url-props`, + throw new Error( + `Clerk: The prop "${legacyProp}" has been removed. Please use "fallbackRedirectUrl" or "forceRedirectUrl" instead. Learn more: https://clerk.com/docs/guides/custom-redirects#redirect-url-props`, ); } } diff --git a/packages/clerk-js/src/utils/redirectUrls.ts b/packages/clerk-js/src/utils/redirectUrls.ts index 0f38695a429..dcda2bb46ad 100644 --- a/packages/clerk-js/src/utils/redirectUrls.ts +++ b/packages/clerk-js/src/utils/redirectUrls.ts @@ -2,7 +2,7 @@ import { applyFunctionToObj, filterProps, removeUndefined } from '@clerk/shared/ import { camelToSnake } from '@clerk/shared/underscore'; import type { ClerkOptions, RedirectOptions } from '@clerk/types'; -import { assertNoLegacyProp, warnForNewPropShadowingLegacyProp } from './assertNoLegacyProp'; +import { assertNoLegacyProp } from './assertNoLegacyProp'; import { isAllowedRedirect, relativeToAbsoluteUrl } from './url'; type ComponentMode = 'modal' | 'mounted'; @@ -13,9 +13,6 @@ export class RedirectUrls { 'signInFallbackRedirectUrl', 'signUpForceRedirectUrl', 'signUpFallbackRedirectUrl', - 'afterSignInUrl', - 'afterSignUpUrl', - 'redirectUrl', ]; private static preserved = ['redirectUrl']; @@ -78,19 +75,13 @@ export class RedirectUrls { this.fromSearchParams.signInFallbackRedirectUrl || this.fromProps.signInFallbackRedirectUrl || this.fromOptions.signInFallbackRedirectUrl; - const afterSignInUrl = - this.fromSearchParams.afterSignInUrl || this.fromProps.afterSignInUrl || this.fromOptions.afterSignInUrl; - const afterSignUpUrl = - this.fromSearchParams.afterSignUpUrl || this.fromProps.afterSignUpUrl || this.fromOptions.afterSignUpUrl; - const redirectUrl = this.fromSearchParams.redirectUrl || this.fromProps.redirectUrl || this.fromOptions.redirectUrl; + const redirectUrl = this.fromSearchParams.redirectUrl; - const res: RedirectOptions = { + const res: RedirectOptions & { redirectUrl?: string | null } = { signUpForceRedirectUrl, signUpFallbackRedirectUrl, signInFallbackRedirectUrl, signInForceRedirectUrl, - afterSignInUrl, - afterSignUpUrl, redirectUrl, }; @@ -108,37 +99,14 @@ export class RedirectUrls { #getRedirectUrl(prefix: 'signIn' | 'signUp') { const forceKey = `${prefix}ForceRedirectUrl` as const; const fallbackKey = `${prefix}FallbackRedirectUrl` as const; - let newKeyInUse: string | undefined; - - const legacyPropKey = `after${prefix[0].toUpperCase()}${prefix.slice(1)}Url` as 'afterSignInUrl' | 'afterSignUpUrl'; let result; // Prioritize forceRedirectUrl result = this.fromSearchParams[forceKey] || this.fromProps[forceKey] || this.fromOptions[forceKey]; - if (result) { - newKeyInUse = forceKey; - } // Try to get redirect_url, only allowed as a search param result ||= this.fromSearchParams.redirectUrl; - if (result) { - newKeyInUse = 'redirectUrl'; - } // Otherwise, fallback to fallbackRedirectUrl result ||= this.fromSearchParams[fallbackKey] || this.fromProps[fallbackKey] || this.fromOptions[fallbackKey]; - if (result) { - newKeyInUse = fallbackKey; - } - - // TODO: v6 - // Remove the compatibility layer for afterSignInUrl and afterSignUpUrl - const legacyValue = - this.fromSearchParams[legacyPropKey] || - this.fromProps[legacyPropKey] || - this.fromProps.redirectUrl || - this.fromOptions[legacyPropKey]; - - warnForNewPropShadowingLegacyProp(newKeyInUse, result, legacyPropKey, legacyValue); - result ||= legacyValue; if (!result && this.mode === 'modal') { return window.location.href; diff --git a/packages/nextjs/src/client-boundary/controlComponents.ts b/packages/nextjs/src/client-boundary/controlComponents.ts index 1ab240a18f5..2e9811364b3 100644 --- a/packages/nextjs/src/client-boundary/controlComponents.ts +++ b/packages/nextjs/src/client-boundary/controlComponents.ts @@ -11,10 +11,7 @@ export { RedirectToSignIn, RedirectToSignUp, RedirectToTasks, - RedirectToUserProfile, AuthenticateWithRedirectCallback, - RedirectToCreateOrganization, - RedirectToOrganizationProfile, } from '@clerk/react'; export { MultisessionAppSupport } from '@clerk/react/internal'; diff --git a/packages/nextjs/src/index.ts b/packages/nextjs/src/index.ts index 2e29bcd7568..041bbaec93a 100644 --- a/packages/nextjs/src/index.ts +++ b/packages/nextjs/src/index.ts @@ -8,12 +8,9 @@ export { ClerkFailed, ClerkLoaded, ClerkLoading, - RedirectToCreateOrganization, - RedirectToOrganizationProfile, RedirectToSignIn, RedirectToSignUp, RedirectToTasks, - RedirectToUserProfile, } from './client-boundary/controlComponents'; /** diff --git a/packages/nextjs/src/server/clerkMiddleware.ts b/packages/nextjs/src/server/clerkMiddleware.ts index 971a8705130..671c034af63 100644 --- a/packages/nextjs/src/server/clerkMiddleware.ts +++ b/packages/nextjs/src/server/clerkMiddleware.ts @@ -64,11 +64,6 @@ export type ClerkMiddlewareSessionAuthObject = (SignedInAuthObject | SignedOutAu redirectToSignUp: RedirectFun; }; -/** - * @deprecated Use `ClerkMiddlewareSessionAuthObject` instead. - */ -export type ClerkMiddlewareAuthObject = ClerkMiddlewareSessionAuthObject; - export type ClerkMiddlewareAuth = AuthFn; type ClerkMiddlewareHandler = ( diff --git a/packages/nextjs/src/server/index.ts b/packages/nextjs/src/server/index.ts index a2bdebbf685..da0d281273e 100644 --- a/packages/nextjs/src/server/index.ts +++ b/packages/nextjs/src/server/index.ts @@ -44,12 +44,7 @@ export { buildClerkProps } from './buildClerkProps'; export { auth } from '../app-router/server/auth'; export { currentUser } from '../app-router/server/currentUser'; export { clerkMiddleware } from './clerkMiddleware'; -export type { - ClerkMiddlewareAuth, - ClerkMiddlewareSessionAuthObject, - ClerkMiddlewareAuthObject, - ClerkMiddlewareOptions, -} from './clerkMiddleware'; +export type { ClerkMiddlewareAuth, ClerkMiddlewareSessionAuthObject, ClerkMiddlewareOptions } from './clerkMiddleware'; /** * Re-export resource types from @clerk/backend diff --git a/packages/nextjs/src/utils/mergeNextClerkPropsWithEnv.ts b/packages/nextjs/src/utils/mergeNextClerkPropsWithEnv.ts index fe8a7937aa3..1fde227907e 100644 --- a/packages/nextjs/src/utils/mergeNextClerkPropsWithEnv.ts +++ b/packages/nextjs/src/utils/mergeNextClerkPropsWithEnv.ts @@ -23,8 +23,6 @@ export const mergeNextClerkPropsWithEnv = (props: Omit { - React.useEffect(() => { - deprecated('RedirectToUserProfile', 'Use the `redirectToUserProfile()` method instead.'); - void clerk.redirectToUserProfile(); - }, []); - - return null; -}, 'RedirectToUserProfile'); - -/** - * @function - * @deprecated Use [`redirectToOrganizationProfile()`](https://clerk.com/docs/reference/javascript/clerk#redirect-to-organization-profile) instead. - */ -export const RedirectToOrganizationProfile = withClerk(({ clerk }) => { - React.useEffect(() => { - deprecated('RedirectToOrganizationProfile', 'Use the `redirectToOrganizationProfile()` method instead.'); - void clerk.redirectToOrganizationProfile(); - }, []); - - return null; -}, 'RedirectToOrganizationProfile'); - -/** - * @function - * @deprecated Use [`redirectToCreateOrganization()`](https://clerk.com/docs/reference/javascript/clerk#redirect-to-create-organization) instead. - */ -export const RedirectToCreateOrganization = withClerk(({ clerk }) => { - React.useEffect(() => { - deprecated('RedirectToCreateOrganization', 'Use the `redirectToCreateOrganization()` method instead.'); - void clerk.redirectToCreateOrganization(); - }, []); - - return null; -}, 'RedirectToCreateOrganization'); - export const AuthenticateWithRedirectCallback = withClerk( ({ clerk, ...handleRedirectCallbackParams }: WithClerkProp) => { React.useEffect(() => { diff --git a/packages/react/src/components/index.ts b/packages/react/src/components/index.ts index cbf9b77aba1..792b2be6234 100644 --- a/packages/react/src/components/index.ts +++ b/packages/react/src/components/index.ts @@ -22,12 +22,9 @@ export { ClerkLoaded, ClerkLoading, Protect, - RedirectToCreateOrganization, - RedirectToOrganizationProfile, RedirectToSignIn, RedirectToSignUp, RedirectToTasks, - RedirectToUserProfile, SignedIn, SignedOut, } from './controlComponents'; diff --git a/packages/react/src/isomorphicClerk.ts b/packages/react/src/isomorphicClerk.ts index 4d8a691cd41..db87e1bcd27 100644 --- a/packages/react/src/isomorphicClerk.ts +++ b/packages/react/src/isomorphicClerk.ts @@ -154,7 +154,6 @@ export class IsomorphicClerk implements IsomorphicLoadedClerk { nativeUnsubscribe?: UnsubscribeCallback; } >(); - private loadedListeners: Array<() => void> = []; #status: ClerkStatus = 'loading'; #domain: DomainOrProxyUrl['domain']; @@ -523,27 +522,6 @@ export class IsomorphicClerk implements IsomorphicLoadedClerk { } }; - /** - * @deprecated Please use `addStatusListener`. This api will be removed in the next major. - */ - public addOnLoaded = (cb: () => void) => { - this.loadedListeners.push(cb); - /** - * When IsomorphicClerk is loaded execute the callback directly - */ - if (this.loaded) { - this.emitLoaded(); - } - }; - - /** - * @deprecated Please use `__internal_setStatus`. This api will be removed in the next major. - */ - public emitLoaded = () => { - this.loadedListeners.forEach(cb => cb()); - this.loadedListeners = []; - }; - private beforeLoad = (clerkjs: BrowserClerk | HeadlessBrowserClerk | undefined) => { if (!clerkjs) { throw new Error('Failed to hydrate latest Clerk JS'); diff --git a/packages/types/src/clerk.ts b/packages/types/src/clerk.ts index a8fc6103bc9..c2d30e2d735 100644 --- a/packages/types/src/clerk.ts +++ b/packages/types/src/clerk.ts @@ -41,7 +41,6 @@ import type { OrganizationCustomRoleKey } from './organizationMembership'; import type { AfterMultiSessionSingleSignOutUrl, AfterSignOutUrl, - LegacyRedirectProps, NewSubscriptionRedirectUrl, RedirectOptions, RedirectUrlProp, @@ -899,8 +898,7 @@ export type HandleOAuthCallbackParams = TransferableOption & SignInForceRedirectUrl & SignInFallbackRedirectUrl & SignUpForceRedirectUrl & - SignUpFallbackRedirectUrl & - LegacyRedirectProps & { + SignUpFallbackRedirectUrl & { /** * Full URL or path where the SignIn component is mounted. */ @@ -970,28 +968,12 @@ type ClerkOptionsNavigation = routerDebug?: boolean; }; -type ClerkOptionsLegacyRedirectProps = { - /** - * @deprecated Use `signInFallbackRedirectUrl` or `signInForceRedirectUrl` instead. - */ - afterSignInUrl?: string | null; - /** - * @deprecated Use `signUpFallbackRedirectUrl` or `signUpForceRedirectUrl` instead. - */ - afterSignUpUrl?: string | null; - /** - * @deprecated Use `signInFallbackRedirectUrl`, `signInForceRedirectUrl`, `signUpFallbackRedirectUrl`, or `signUpForceRedirectUrl` instead. - */ - redirectUrl?: string | null; -}; - export type ClerkOptions = ClerkOptionsNavigation & SignInForceRedirectUrl & SignInFallbackRedirectUrl & SignUpForceRedirectUrl & SignUpFallbackRedirectUrl & NewSubscriptionRedirectUrl & - ClerkOptionsLegacyRedirectProps & AfterSignOutUrl & AfterMultiSessionSingleSignOutUrl & { /** @@ -1226,13 +1208,6 @@ export type SetActiveParams = { */ organization?: OrganizationResource | string | null; - /** - * @deprecated Use `redirectUrl` instead. - * - * Callback run just before the active session and/or organization is set to the passed object. Can be used to set up for pre-navigation actions. - */ - beforeEmit?: BeforeEmitCallback; - /** * The full URL or path to redirect to just before the session and/or organization is set. */ @@ -1333,7 +1308,6 @@ export type SignInProps = RoutingOptions & { } & TransferableOption & SignUpForceRedirectUrl & SignUpFallbackRedirectUrl & - LegacyRedirectProps & AfterSignOutUrl; export interface TransferableOption { @@ -1473,7 +1447,6 @@ export type SignUpProps = RoutingOptions & { oidcPrompt?: string; } & SignInFallbackRedirectUrl & SignInForceRedirectUrl & - LegacyRedirectProps & AfterSignOutUrl; export type SignUpModalProps = WithoutRouting; @@ -1562,12 +1535,6 @@ export type CreateOrganizationProps = RoutingOptions & { * prop of ClerkProvider (if one is provided) */ appearance?: CreateOrganizationTheme; - /** - * @deprecated - * This prop will be removed in a future version. - * Configure whether organization slug is enabled via the Clerk Dashboard under Organization Settings. - */ - hideSlug?: boolean; }; export type CreateOrganizationModalProps = WithoutRouting; @@ -1602,17 +1569,6 @@ export type UserButtonProps = UserButtonProfileMode & { */ __experimental_asStandalone?: boolean | ((opened: boolean) => void); - /** - * Full URL or path to navigate to after sign out is complete - * @deprecated Configure `afterSignOutUrl` as a global configuration, either in `` or in `await Clerk.load()`. - */ - afterSignOutUrl?: string; - /** - * Full URL or path to navigate to after signing out the current user is complete. - * This option applies to multi-session applications. - * @deprecated Configure `afterMultiSessionSingleSignOutUrl` as a global configuration, either in `` or in `await Clerk.load()`. - */ - afterMultiSessionSingleSignOutUrl?: string; /** * Full URL or path to navigate to on "Add another account" action. * Multi-session mode only. diff --git a/packages/types/src/json.ts b/packages/types/src/json.ts index 4a71431fb0a..0fd351ae229 100644 --- a/packages/types/src/json.ts +++ b/packages/types/src/json.ts @@ -303,10 +303,6 @@ export interface UserJSON extends ClerkResourceJSON { external_accounts: ExternalAccountJSON[]; enterprise_accounts: EnterpriseAccountJSON[]; passkeys: PasskeyJSON[]; - /** - * @deprecated Use `enterprise_accounts` instead. - */ - saml_accounts: SamlAccountJSON[]; organization_memberships: OrganizationMembershipJSON[]; password_enabled: boolean; diff --git a/packages/types/src/localization.ts b/packages/types/src/localization.ts index d1cf1ac078e..5d57055f3ac 100644 --- a/packages/types/src/localization.ts +++ b/packages/types/src/localization.ts @@ -633,14 +633,6 @@ export type __internal_LocalizationResource = { title: LocalizationValue; primaryButton: LocalizationValue; actionLabel__connectionFailed: LocalizationValue; - /** - * @deprecated Use `actionLabel__connectionFailed` instead. - */ - actionLabel__reauthorize: LocalizationValue; - /** - * @deprecated Use `subtitle__disconnected` instead. - */ - subtitle__reauthorize: LocalizationValue; subtitle__disconnected: LocalizationValue; destructiveActionTitle: LocalizationValue; }; @@ -720,10 +712,6 @@ export type __internal_LocalizationResource = { successMessage: LocalizationValue; }; emailLink: { - /** - * @deprecated Use `emailAddressPage.formHint` instead. - */ - formHint: LocalizationValue; formTitle: LocalizationValue; formSubtitle: LocalizationValue<'identifier'>; resendButton: LocalizationValue; diff --git a/packages/types/src/redirects.ts b/packages/types/src/redirects.ts index 5f81d7cce2a..d50d9e2955d 100644 --- a/packages/types/src/redirects.ts +++ b/packages/types/src/redirects.ts @@ -15,24 +15,6 @@ export type AfterMultiSessionSingleSignOutUrl = { afterMultiSessionSingleSignOutUrl?: string | null; }; -/** - * @deprecated This will be removed in a future release. - */ -export type LegacyRedirectProps = { - /** - * @deprecated Use `fallbackRedirectUrl` or `forceRedirectUrl` instead. - */ - afterSignInUrl?: string | null; - /** - * @deprecated Use `fallbackRedirectUrl` or `forceRedirectUrl` instead. - */ - afterSignUpUrl?: string | null; - /** - * @deprecated Use `fallbackRedirectUrl` or `forceRedirectUrl` instead. - */ - redirectUrl?: string | null; -}; - /** * Redirect URLs for different actions. * Mainly used to be used to type internal Clerk functions. @@ -40,8 +22,7 @@ export type LegacyRedirectProps = { export type RedirectOptions = SignInForceRedirectUrl & SignInFallbackRedirectUrl & SignUpForceRedirectUrl & - SignUpFallbackRedirectUrl & - LegacyRedirectProps; + SignUpFallbackRedirectUrl; export type AuthenticateWithRedirectParams = { /** diff --git a/packages/types/src/signUpCommon.ts b/packages/types/src/signUpCommon.ts index 62b81715a2a..5210a13fa5d 100644 --- a/packages/types/src/signUpCommon.ts +++ b/packages/types/src/signUpCommon.ts @@ -106,11 +106,6 @@ export type SignUpCreateParams = Partial< export type SignUpUpdateParams = SignUpCreateParams; -/** - * @deprecated Use `SignUpAuthenticateWithWeb3Params` instead. - */ -export type SignUpAuthenticateWithMetamaskParams = SignUpAuthenticateWithWeb3Params; - export type SignUpAuthenticateWithWeb3Params = { unsafeMetadata?: SignUpUnsafeMetadata; }; diff --git a/packages/types/src/snapshots.ts b/packages/types/src/snapshots.ts index 13c423e8cb3..660cbd40b20 100644 --- a/packages/types/src/snapshots.ts +++ b/packages/types/src/snapshots.ts @@ -76,7 +76,6 @@ export type UserJSONSnapshot = Override< passkeys: PasskeyJSONSnapshot[]; enterprise_accounts: EnterpriseAccountJSONSnapshot[]; phone_numbers: PhoneNumberJSONSnapshot[]; - saml_accounts: SamlAccountJSONSnapshot[]; web3_wallets: Web3WalletJSONSnapshot[]; } >; diff --git a/packages/types/src/user.ts b/packages/types/src/user.ts index 951735d88c6..7670c84d031 100644 --- a/packages/types/src/user.ts +++ b/packages/types/src/user.ts @@ -14,7 +14,6 @@ import type { ClerkPaginatedResponse, ClerkPaginationParams } from './pagination import type { PasskeyResource } from './passkey'; import type { PhoneNumberResource } from './phoneNumber'; import type { ClerkResource } from './resource'; -import type { SamlAccountResource } from './samlAccount'; import type { SessionWithActivitiesResource } from './session'; import type { UserJSONSnapshot } from './snapshots'; import type { OAuthStrategy } from './strategies'; @@ -82,10 +81,6 @@ export interface UserResource extends ClerkResource, BillingPayerMethods { externalAccounts: ExternalAccountResource[]; enterpriseAccounts: EnterpriseAccountResource[]; passkeys: PasskeyResource[]; - /** - * @deprecated Use `enterpriseAccounts` instead. - */ - samlAccounts: SamlAccountResource[]; organizationMemberships: OrganizationMembershipResource[]; passwordEnabled: boolean;