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

Update clerk (major) #3704

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Update clerk (major) #3704

wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Apr 19, 2024

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@clerk/clerk-react (source) 4.32.0 -> 5.2.1 age adoption passing confidence
@clerk/nextjs (source) 4.31.0 -> 5.1.2 age adoption passing confidence
@clerk/types (source) 3.65.0 -> 4.5.0 age adoption passing confidence

Release Notes

clerk/javascript (@​clerk/clerk-react)

v5.2.1

Compare Source

Patch Changes

v5.2.0

Compare Source

Minor Changes
React component
  • <GoogleOneTap/>

Customize the UX of the prompt

<GoogleOneTap
  cancelOnTapOutside={false}
  itpSupport={false}
  fedCmSupport={false}
/>
Use the component from with Vanilla JS
  • Clerk.openGoogleOneTap(props: GoogleOneTapProps)
  • Clerk.closeGoogleOneTap()
Low level APIs for custom flows
  • await Clerk.authenticateWithGoogleOneTap({ token: 'xxxx'})
  • await Clerk.handleGoogleOneTapCallback()

We recommend using this two methods together in order and let Clerk to perform the correct redirections.

google.accounts.id.initialize({
  callback: async response => {
    const signInOrUp = await Clerk.authenticateWithGoogleOneTap({ token: response.credential });
    await Clerk.handleGoogleOneTapCallback(signInOrUp, {
      signInForceRedirectUrl: window.location.href,
    });
  },
});

In case you want to handle the redirection and session management yourself you can do so like this

google.accounts.id.initialize({
  callback: async response => {
    const signInOrUp = await Clerk.authenticateWithGoogleOneTap({ token: response.credential });
    if (signInOrUp.status === 'complete') {
      await Clerk.setActive({
        session: signInOrUp.createdSessionId,
      });
    }
  },
});
Patch Changes

v5.1.0

Compare Source

Minor Changes
Patch Changes

v5.0.7

Compare Source

Patch Changes

v5.0.6

Compare Source

Patch Changes

v5.0.5

Compare Source

Patch Changes
  • Respect the signInForceRedirectUrl, signInFallbackRedirectUrl, signUpForceRedirectUrl and signUpFallbackRedirectUrl props passed to SignInButton, SignUpButton and the low-level window.Clerk.buildSignInUrl & window.Clerk.buildSignUpUrl methods. These props allow you to control the redirect behavior of the SignIn and SignUp components. For more information, refer to the Custom Redirects guide. (#​3361) by @​nikosdouvlis

  • Updated dependencies [94197710a, b27ca8366]:

v5.0.4

Compare Source

Patch Changes
  • Rename local eslint-config-custom package to @clerk/eslint-config-custom to avoid conflicts with previously published package. Removes eslint-config-custom from @clerk/clerk-react's dependencies, as it should only be a development dependency. (#​3307) by @​BRKalow

  • The following are all internal changes and not relevant to any end-user: (#​3341) by @​LauraBeatris

    Add telemetry events for useSignIn, useSignUp, useOrganizations and useOrganizationList

  • Updated dependencies [1662aaae9, f70c885f7, f5804a225]:

v5.0.3

Compare Source

Patch Changes
  • Remove type from clerkjs script attributes that prevents the satellite apps from function properly. (#​3304) by @​panteliselef

v5.0.2

Compare Source

Patch Changes

v5.0.1

Compare Source

Patch Changes

v5.0.0

Compare Source

Major Changes
  • 2a67f72: Replace the signOutCallback prop on the <SignOutButton /> with redirectUrl. This aligns the API surface with other UI components provided by @clerk/clerk-react.

    If you previously used the signOutCallback prop to navigate to another page, you can migrate as shown below.

    Before:

    import { SignOutButton } from '@&#8203;clerk/clerk-react';
    
    export const Signout = () => {
      return (
        <SignOutButton
          signOutCallback={() => {
            window.location.href = '/your-path';
          }}
        >
          <button>Sign Out</button>
        </SignOutButton>
      );
    };

    After:

    import { SignOutButton } from '@&#8203;clerk/clerk-react';
    
    export const Signout = () => {
      return (
        <SignOutButton redirectUrl='/your-path'>
          <button>Sign Out</button>
        </SignOutButton>
      );
    };
  • c2a0905: Change the minimal Node.js version required by Clerk to 18.17.0.

  • deac67c: Drop default exports from all packages. Migration guide:

    • use import { Clerk } from '@&#8203;clerk/backend';
    • use import { clerkInstance } from '@&#8203;clerk/clerk-sdk-node';
    • use import { Clerk } from '@&#8203;clerk/clerk-sdk-node';
    • use import { Clerk } from '@&#8203;clerk/clerk-js';
    • use import { Clerk } from '@&#8203;clerk/clerk-js/headless';
    • use import { IsomorphicClerk } from '@&#8203;clerk/clerk-react'
  • 83e9d08: Drop deprecations. Migration steps:

    • use EmailLinkError instead of MagicLinkError
    • use isEmailLinkError instead of isMagicLinkError
    • use EmailLinkErrorCode instead of MagicLinkErrorCode
    • use useEmailLink instead of useMagicLink
    • use buildRequestUrl from @clerk/backend instead of getRequestUrl from @clerk/shared
    • use OrganizationProvider instead of OrganizationContext
    • use userMemberships instead of organizationList from useOrganizationList
  • 7f833da: Drop deprecations. Migration steps:

    • use publishableKey instead of frontendApi
    • use Clerk.handleEmailLinkVerification() instead of Clerk.handleMagicLinkVerification()
    • use isEmailLinkError instead of isMagicLinkError
    • use EmailLinkErrorCode instead of MagicLinkErrorCode
    • use useEmailLink instead of useMagicLink
    • drop orgs jwt claim from session token
    • use ExternalAccount.imageUrl instead of ExternalAccount.avatarUrl
    • use Organization.imageUrl instead of Organization.logoUrl
    • use User.imageUrl instead of User.profileImageUrl
    • use OrganizationMembershipPublicUserData.imageUrl instead of OrganizationMembershipPublicUserData.profileImageUrl
    • use useOrganizationList instead of useOrganizations
    • use userProfileProps instead of userProfile in Appearance
    • use Clerk.setActive() instead of Clerk.setSession()
    • drop password param in User.update()
    • use afterSelectOrganizationUrl instead of afterSwitchOrganizationUrl in OrganizationSwitcher
    • drop Clerk.experimental_canUseCaptcha / Clerk.Clerk.experimental_captchaSiteKey / Clerk.experimental_captchaURL (were meant for internal use)
    • use User.getOrganizationMemberships() instead of Clerk.getOrganizationMemberships()
    • drop lastOrganizationInvitation / lastOrganizationMember from Clerk emitted events
    • drop Clerk.__unstable__invitationUpdate / Clerk.__unstable__membershipUpdate
    • drop support for string param in Organization.create()
    • use Organization.getInvitations() instead of Organization.getPendingInvitations()
    • use pageSize instead of limit in OrganizationMembership.retrieve()
    • use initialPage instead of offset in OrganizationMembership.retrieve()
    • drop lastOrganizationInvitation / lastOrganizationMember from ClerkProvider
    • use invitations instead of invitationList in useOrganization
    • use memberships instead of membershipList in useOrganization
    • use redirectUrl instead of redirect_url in User.createExternalAccount()
    • use signature instead of generatedSignature in Signup.attemptWeb3WalletVerification()
  • cfea3d9: Path-based routing is now the default routing strategy if the path prop is filled. Additionally, if the path and routing props are not filled, an error will be thrown.

    // Without path or routing props, an error with be thrown
    <UserProfile />
    <CreateOrganization />
    <OrganizationProfile />
    <SignIn />
    <SignUp />
    
    // Alternative #&#8203;1
    <UserProfile path="/whatever"/>
    <CreateOrganization path="/whatever"/>
    <OrganizationProfile path="/whatever"/>
    <SignIn path="/whatever"/>
    <SignUp path="/whatever"/>
    
    // Alternative #&#8203;2
    <UserProfile routing="hash_or_virtual"/>
    <CreateOrganization routing="hash_or_virtual"/>
    <OrganizationProfile routing="hash_or_virtual"/>
    <SignIn routing="hash_or_virtual"/>
    <SignUp routing="hash_or_virtual"/>
  • 7bffc47: Drop Clerk.isReady(). Use Clerk.loaded instead.

  • 2a22aad: Drop deprecations. Migration steps:

    • drop orgs jwt claim from session token
    • change type of auth param of withServerAuth() callback to AuthObject from ServerSideAuth in gatsby-clerk-plugin
      • use auth.sessionClaims instead of auth.claims
      • use AuthObject properties from auth
    • use publishableKey instead of frontendApi
    • use ClerkProviderOptionsWrapper type instead of IsomorphicClerkOptions
  • 8aea39c: - Introduce @clerk/clerk-react/errors and @clerk/clerk-react/internal subpath exports to expose some internal utilities. Eg

    // Before
    import { **internal**setErrorThrowerOptions } from '@&#8203;clerk/clerk-react';
    // After
    import { setErrorThrowerOptions } from '@&#8203;clerk/clerk-react/internal';
    
        // Before
        import { isClerkAPIResponseError, isEmailLinkError, isKnownError, isMetamaskError } from '@&#8203;clerk/clerk-react';
        // After
        import { isClerkAPIResponseError, isEmailLinkError, isKnownError, isMetamaskError } from '@&#8203;clerk/clerk-react/errors';
    
        // Before
        import { MultisessionAppSupport } from '@&#8203;clerk/clerk-react';
        // After
        import { MultisessionAppSupport } from '@&#8203;clerk/clerk-react/internal';
        ```
    
    - Drop from the `@clerk/clerk-react` and all other clerk-react wrapper packages:
      - `__internal__setErrorThrowerOptions` internal utility (moved to /internal subpath)
      - `WithClerkProp` type
      - `MultisessionAppSupport` component (moved to /internal subpath)
      - `EmailLinkErrorCode` enum
    - Drop `StructureContext` and related errors to reduce to reduce code complexity since it seems that it was not being used.
    - Drop `withUser`, `WithUser`, `withClerk` HOFs and `WithClerk`, `withSession`, `WithSession` HOCs from the `@clerk/clerk-react`
      to reduce the export surface since it's trivial to implement if needed.
  • 5f58a22: Remove hashing and third-party cookie functionality related to development instance session syncing in favor of URL-based session syncing with query parameters.

  • 5f58a22: - buildUrlWithAuth no longer accepts an options argument.

  • 52ff8fe: Upgrade React version to >=18 and add react-dom as peer dependency
    to fix issues with vite & rollup building.

  • ab4eb56: Drop redirectToHome redirect method in favour of redirectToAfterSignUp or redirectToAfterSignIn.

    When the <SignIn/> and <SignUp/> components are rendered while a user is already logged in, they will now redirect to the configured afterSignIn and afterSignUp URLs, respectively. Previously, the redirect URL was set to the home URL configured in the dashboard.

  • 97407d8: Dropping support for Node 14 and 16 as they both reached EOL status. The minimal Node.js version required by Clerk is 18.18.0 now.

  • f5fb63c: Consolidate afterSignOutOneUrl & afterSignOutAllUrl to afterSignOutUrl and drop usage of Dashboard settings in ClerkJS components. The Dashboard settings should only apply to the Account Portal application.

  • 4771709: Drop deprecations. Migration steps:

    • drop formFieldLabel__emailAddress_phoneNumber from localization keys
    • drop formFieldLabel__phoneNumber_username from localization keys
    • drop formFieldLabel__emailAddress_phoneNumber_username from localization keys
    • drop formFieldInputPlaceholder__emailAddress_phoneNumber from localization keys
    • drop formFieldInputPlaceholder__phoneNumber_username from localization keys
    • drop formFieldInputPlaceholder__emailAddress_phoneNumber_username from localization keys
    • use title__connectionFailed instead of title__conectionFailed from localization keys
    • use actionLabel__connectionFailed instead of actionLabel__conectionFailed from localization keys
    • use headerTitle__members instead of headerTitle__active from localization keys
    • use headerTitle__invitations instead of headerTitle__invited from localization keys
    • drop createOrganization.subtitle from localization keys
    • use deDE instead of deDe localization from @clerk/localizations
  • 3c42090: Drop deprecations. Migration steps:

    • use setActive instead of setSession from useSessionList | useSignUp | useSignIn hooks
    • use publishableKey instead of frontendApi
    • use handleEmailLinkVerification instead of handleMagicLinkVerification from IsomorphicClerk
    • use isEmailLinkError instead of isMagicLinkError
    • use EmailLinkErrorCode instead of MagicLinkErrorCode
    • use useEmailLink instead of useMagicLink
  • 844847e: Align return types for redirectTo* methods in ClerkJS [SDK-1037]

    Breaking Changes:

    • redirectToUserProfile now returns Promise<unknown> instead of void
    • redirectToOrganizationProfile now returns Promise<unknown> instead of void
    • redirectToCreateOrganization now returns Promise<unknown> instead of void
    • redirectToHome now returns Promise<unknown> instead of void
Minor Changes
  • 7f6a64f: - By default, all the components with routing will have the routing prop assigned as 'path' by default when the path prop is filled.

    • The <UserButton /> component will set the default value of the userProfileMode prop to 'navigation' if the userProfileUrl prop is provided.
    • The <OrganizationSwitcher /> component will have the organizationProfileMode and createOrganizationMode props assigned with 'navigation' by default if the organizationProfileUrl and createOrganizationUrl props are filled accordingly.
  • ff08fe2: Introduce experimental support for Google One Tap

    • React Component <__experimental_GoogleOneTap/>
    • JS clerk.__experimental_mountGoogleOneTap(node,props)
  • c9e0f68: Fix @clerk/clerk-react bundle output to resolve issues with vite / rollup ESM module imports.
    We have also used the bundle output to export a single index.ts and dropped the unnecessary
    published files / folders (eg __tests__).

  • fe2607b: Remove MembershipRole. The type MembershipRole would always include the old role keys admin, basic_member, guest_member.
    If developers still depend on them after the introduction of custom roles, the can provide them as their custom types for authorization.

    // clerk.d.ts
    interface ClerkAuthorization {
      permission: '';
      role: 'admin' | 'basic_member' | 'guest_member';
    }
  • c7e6d00: Experimental support for <Gate/> with role checks.

  • 4bb5705: Breaking Changes:

    • Drop isLegacyFrontendApiKey from @clerk/shared
    • Drop default exports from @clerk/clerk-js
      • on headless Clerk type
      • on ui and ui.retheme Portal
    • Use isProductionFromSecretKey instead of isProductionFromApiKey
    • Use isDevelopmentFromSecretKey instead of isDevelopmentFromApiKey

    Changes:

    • Rename HeadlessBrowserClerkConstrutor / HeadlessBrowserClerkConstructor (typo)
    • Use isomorphicAtob / isomorhpicBtoa to replace base-64 in @clerk/expo
    • Refactor merging build-time and runtime props in @clerk/backend clerk client
    • Drop node-fetch dependency from @clerk/backend
    • Drop duplicate test in @clerk/backend
  • 2e4a430: Update @clerk/clerk-js and @clerk/clerk-react to support the following examples:

    Clerk.signOut({ redirectUrl: '/' })
    
    <SignOutButton redirectUrl='/' />
    // uses Clerk.signOut({ redirectUrl: '/' })
    <UserButton afterSignOutUrl='/after' />
    // uses Clerk.signOut({ redirectUrl: '/after' })
    <ClerkProvider afterSignOutUrl='/after' />
    // uses Clerk.signOut({ redirectUrl: '/after' })
  • f98e480: Speed up loading of clerk-js by using a <script/> tag when html is generated.
    This is supported during SSR, SSG in

    • Next.js Pages Router
    • Next.js App Router
  • 46040a2: Introduce Protect for authorization.
    Changes in public APIs:

    • Rename Gate to Protect
    • Support for permission checks. (Previously only roles could be used)
    • Remove the experimental tags and prefixes
    • Drop some from the has utility and Protect. Protect now accepts a condition prop where a function is expected with the has being exposed as the param.
    • Protect can now be used without required props. In this case behaves as <SignedIn>, if no authorization props are passed.
    • has will throw an error if neither permission or role is passed.
    • auth().protect() for Nextjs App Router. Allow per page protection in app router. This utility will automatically throw a 404 error if user is not authorized or authenticated.
      • inside a page or layout file it will render the nearest not-found component set by the developer
      • inside a route handler it will return empty response body with a 404 status code
  • 18c0d01: Pass environment into sdkMetadata in order to detect if production clerk-js is used by other sdks in dev mode. When it is log dev warning from clerk-js.

  • d6a7ea6: Update the TypeScript types of <ClerkProvider />. If you use the routerPush prop you're now required to also provide the routerReplace prop (or other way around). You can also not provide them at all since both props are optional.

  • db2d829: Apply the following changes to components with routing props:

    • default is routing="path" and path prop is required to be set via env or context
    • when routing="hash" or routing="virtual" is set the implicit (via env or context) path option is ignored
    • when routing="hash" or routing="virtual" then path prop is not allowed to be set

    Examples of components with routing props:

    • <CreateOrganization />
    • <OrganizationProfile />
    • <SignIn />
    • <SignUp />
    • <UserProfile />
Patch Changes
  • 6ac9e71: Properly fire onLoad event when clerk-js is already loaded.

  • 2de442b: Rename beta-v5 to beta

  • ee57f21: Export EmailLinkErrorCode from /errors module

  • 2e77cd7: Set correct information on required Node.js and React versions in README

  • ae3a668: Ignore .test.ts files for the build output. Should result in smaller bundle size.

  • 6e54b1b: Sync IsomorphicClerk with the clerk singleton and the LoadedClerk interface. IsomorphicClerk now extends from LoadedClerk.

  • 8cc45d2: Allow dynamic values components props, even if these values change after the components are rendered. For example, a SignIn component with a redirectUrl prop passed in will always respect the latest value of redirectUrl.

  • 797e327: Replace internal logic of determining package tag & major version with semver in order to have a more robust solution

  • c86f73b: Introducing stricter types for custom pages for UserProfile and OrganizationProfile.

  • 1affbb2: Replace semver with custom regex in versionSelector

  • 75ea300: Add useAssertWrappedByClerkProvider to internal code. If you use hooks like useAuth outside of the <ClerkProvider /> context an error will be thrown. For example:

    @&#8203;clerk/clerk-react: useAuth can only be used within the <ClerkProvider /> component
  • e9841dd: Fixes error thrown for missing path & routing props when path was passed from context.
    This change affects components <SignIn />, <SignUp /> from @clerk/nextjs and @clerk/remix.

  • 59f9a72: Fixes error when path is passed from context and a routing strategy other than path is passed as a prop.
    This change affects components <SignIn />, <SignUp /> from @clerk/nextjs and @clerk/remix.

  • e0e79b4: Use the errorThrower shared utility when throwing errors

  • fb794ce: Support older iOS 13.3 and 13.4 mobile devices

  • 40ac4b6: Introduces telemetry collection from Clerk's SDKs. Collected telemetry will be used to gain insights into product usage and help drive roadmap priority. For more information, see https://clerk.com/docs/telemetry.

  • Updated dependencies [743c4d2]

  • Updated dependencies [4b8bedc]

  • Updated dependencies [1db1f40]

  • Updated dependencies [c2a0905]

  • Updated dependencies [0d0b1d8]

  • Updated dependencies [1834a3e]

  • Updated dependencies [896cb61]

  • Updated dependencies [64d3763]

  • Updated dependencies [8350109]

  • Updated dependencies [1dc28ab]

  • Updated dependencies [83e9d08]

  • Updated dependencies [d37d44a]

  • Updated dependencies [fe356ee]

  • Updated dependencies [791c498]

  • Updated dependencies [ea49336]

  • Updated dependencies [7f6a64f]

  • Updated dependencies [afec179]

  • Updated dependencies [0699fa4]

  • Updated dependencies [a68eb30]

  • Updated dependencies [2de442b]

  • Updated dependencies [0293f29]

  • Updated dependencies [5f58a22]

  • Updated dependencies [9180c8b]

  • Updated dependencies [db18787]

  • Updated dependencies [7f833da]

  • Updated dependencies [ef2325d]

  • Updated dependencies [fc3ffd8]

  • Updated dependencies [840636a]

  • Updated dependencies [bab2e7e]

  • Updated dependencies [71663c5]

  • Updated dependencies [492b8a7]

  • Updated dependencies [2352149]

  • Updated dependencies [e5c989a]

  • Updated dependencies [ff08fe2]

  • Updated dependencies [7ecd6f6]

  • Updated dependencies [12f3c5c]

  • Updated dependencies [244de5e]

  • Updated dependencies [c776f86]

  • Updated dependencies [d9f265f]

  • Updated dependencies [7bffc47]

  • Updated dependencies [9737ef5]

  • Updated dependencies [fafa76f]

  • Updated dependencies [1f650f3]

  • Updated dependencies [97407d8]

  • Updated dependencies [2a22aad]

  • Updated dependencies [69ce3e1]

  • Updated dependencies [78fc5ee]

  • Updated dependencies [a9fe242]

  • Updated dependencies [5f58a22]

  • Updated dependencies [6a33709]

  • Updated dependencies [52ff8fe]

  • Updated dependencies [f77e8cd]

  • Updated dependencies [8b466a9]

  • Updated dependencies [fe2607b]

  • Updated dependencies [c7e6d00]

  • Updated dependencies [8cc45d2]

  • Updated dependencies [6632432]

  • Updated dependencies [c6a5e0f]

  • Updated dependencies [4edb776]

  • Updated dependencies [ab4eb56]

  • Updated dependencies [a9fe242]

  • Updated dependencies [5c239d9]

  • Updated dependencies [97407d8]

  • Updated dependencies [12962bc]

  • Updated dependencies [4bb5705]

  • Updated dependencies [d4ff346]

  • Updated dependencies [7644b74]

  • Updated dependencies [2ec9f6b]

  • Updated dependencies [2e4a430]

  • Updated dependencies [5aab9f0]

  • Updated dependencies [46040a2]

  • Updated dependencies [f00fd2d]

  • Updated dependencies [8daf845]

  • Updated dependencies [75ea300]

  • Updated dependencies [9a1fe37]

  • Updated dependencies [7f751c4]

  • Updated dependencies [f5d55bb]

  • Updated dependencies [18c0d01]

  • Updated dependencies [0d1052a]

  • Updated dependencies [d30ea1f]

  • Updated dependencies [7886ba8]

  • Updated dependencies [1fd2eff]

  • Updated dependencies [9a1fe37]

  • Updated dependencies [5471c7e]

  • Updated dependencies [f540e98]

  • Updated dependencies [4771709]

  • Updated dependencies [38d8b3e]

  • Updated dependencies [be99136]

  • Updated dependencies [8350f73]

  • Updated dependencies [d6a7ea6]

  • Updated dependencies [e0e79b4]

  • Updated dependencies [41ae1d2]

  • Updated dependencies [fb794ce]

  • Updated dependencies [48ca40a]

  • Updated dependencies [94519aa]

  • Updated dependencies [ebf9be7]

  • Updated dependencies [008ac42]

  • Updated dependencies [40ac4b6]

  • Updated dependencies [6f755ad]

  • Updated dependencies [429d030]

  • Updated dependencies [844847e]

  • Updated dependencies [6eab660]

clerk/javascript (@​clerk/nextjs)

v5.1.2

Compare Source

Patch Changes

v5.1.1

Compare Source

Patch Changes

v5.1.0

Compare Source

Minor Changes
React component
  • <GoogleOneTap/>

Customize the UX of the prompt

<GoogleOneTap
  cancelOnTapOutside={false}
  itpSupport={false}
  fedCmSupport={false}
/>
Use the component from with Vanilla JS
  • Clerk.openGoogleOneTap(props: GoogleOneTapProps)
  • Clerk.closeGoogleOneTap()
Low level APIs for custom flows
  • await Clerk.authenticateWithGoogleOneTap({ token: 'xxxx'})
  • await Clerk.handleGoogleOneTapCallback()

We recommend using this two methods together in order and let Clerk to perform the correct redirections.

google.accounts.id.initialize({
  callback: async response => {
    const signInOrUp = await Clerk.authenticateWithGoogleOneTap({ token: response.credential });
    await Clerk.handleGoogleOneTapCallback(signInOrUp, {
      signInForceRedirectUrl: window.location.href,
    });
  },
});

In case you want to handle the redirection and session management yourself you can do so like this

google.accounts.id.initialize({
  callback: async response => {
    const signInOrUp = await Clerk.authenticateWithGoogleOneTap({ token: response.credential });
    if (signInOrUp.status === 'complete') {
      await Clerk.setActive({
        session: signInOrUp.createdSessionId,
      });
    }
  },
});
Patch Changes

v5.0.12

Compare Source

Patch Changes

v5.0.11

Compare Source

Patch Changes

v5.0.10

Compare Source

Patch Changes

v5.0.9

Compare Source

Patch Changes

v5.0.8

Compare Source

Patch Changes

v5.0.7

Compare Source

Patch Changes

v5.0.6

Compare Source

Patch Changes

v5.0.5

Compare Source

Patch Changes

v5.0.4

Compare Source

Patch Changes

v5.0.3

Compare Source

Patch Changes

v5.0.2

Compare Source

Patch Changes
  • Export all Webhook event types and related JSON types. The newly exported types are: DeletedObjectJSON, EmailJSON, OrganizationInvitationJSON, OrganizationJSON, OrganizationMembershipJSON, SessionJSON, SMSMessageJSON, UserJSON, UserWebhookEvent, EmailWebhookEvent, SMSWebhookEvent, SessionWebhookEvent, OrganizationWebhookEvent, OrganizationMembershipWebhookEvent, OrganizationInvitationWebhookEvent (#​3248) by @​nikosdouvlis

  • Updated dependencies [3c6e5a6f1, 65503dcb9]:

v5.0.1

Compare Source

Patch Changes
  • cfbe43d: Correctly read legacy NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL and NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL env variables

v5.0.0

Compare Source

Major Changes
  • c2a0905: Change the minimal Node.js version required by Clerk to 18.17.0.

  • f31031a: Drop deprecations. Migration steps:

    • use NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY instead of NEXT_PUBLIC_CLERK_FRONTEND_API env variable
    • use NEXT_PUBLIC_CLERK_JS_VERSION instead of CLERK_JS_VERSION
    • use CLERK_SECRET_KEY instead of CLERK_API_KEY
    • use publishableKey instead of frontendApi
    • use isEmailLinkError instead of isMagicLinkError
    • use EmailLinkErrorCode instead of MagicLinkErrorCode
    • use useEmailLink instead of useMagicLink
    • use @clerk/nextjs instead of @clerk/nextjs/app-beta
    • use @clerk/nextjs instead of @clerk/nextjs/ssr
    • use @clerk/nextjs instead of @clerk/nextjs/edge-middleware or @clerk/nextjs/edge-middlewarefiles
    • use @clerk/nextjs instead of @clerk/nextjs/api
    • use middleware with authMiddleware instead of withClerkMiddleware
    • avoid using exported constants: API_URL, API_VERSION, CLERK_JS_URL, CLERK_JS_VERSION, DOMAIN, IS_SATELLITE, PROXY_URL, PUBLISHABLE_KEY, SECRET_KEY, SIGN_IN_URL, SIGN_UP_URL
  • 7f833da: Drop deprecations. Migration steps:

    • use publishableKey instead of frontendApi
    • use Clerk.handleEmailLinkVerification() instead of Clerk.handleMagicLinkVerification()
    • use isEmailLinkError instead of isMagicLinkError
    • use EmailLinkErrorCode instead of MagicLinkErrorCode
    • use useEmailLink instead of useMagicLink
    • drop orgs jwt claim from session token
    • use ExternalAccount.imageUrl instead of ExternalAccount.avatarUrl
    • use Organization.imageUrl instead of Organization.logoUrl
    • use User.imageUrl instead of User.profileImageUrl
    • use OrganizationMembershipPublicUserData.imageUrl instead of OrganizationMembershipPublicUserData.profileImageUrl
    • use useOrganizationList instead of useOrganizations
    • use userProfileProps instead of userProfile in Appearance
    • use Clerk.setActive() instead of Clerk.setSession()
    • drop password param in User.update()
    • use afterSelectOrganizationUrl instead of afterSwitchOrganizationUrl in OrganizationSwitcher
    • drop Clerk.experimental_canUseCaptcha / Clerk.Clerk.experimental_captchaSiteKey / Clerk.experimental_captchaURL (were meant for internal use)
    • use User.getOrganizationMemberships() instead of Clerk.getOrganizationMemberships()
    • drop lastOrganizationInvitation / `lastOrganizationMember

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

Copy link

changeset-bot bot commented Apr 19, 2024

⚠️ No Changeset found

Latest commit: 9f62433

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

codesandbox-ci bot commented Apr 19, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@renovate renovate bot force-pushed the renovate/major-clerk branch 2 times, most recently from 527f76f to e908dd5 Compare April 24, 2024 15:03
@renovate renovate bot changed the title Update clerk (major) Update dependency @clerk/nextjs to v5 May 1, 2024
@renovate renovate bot changed the title Update dependency @clerk/nextjs to v5 Update clerk (major) May 1, 2024
@renovate renovate bot force-pushed the renovate/major-clerk branch 2 times, most recently from 5969ed7 to 4cc7d15 Compare May 14, 2024 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

0 participants