Skip to content

Releases: clerk/javascript

@clerk/[email protected]

21 May 20:28
7ee868c
Compare
Choose a tag to compare

Minor Changes

  • Add support for GoogleOneTap. New APIs listed: (#3392) by @panteliselef

    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

  • A bug was fixed to not override the existing sign-up state on the OAuth callback. (#3401) by @LauraBeatris

    When continuing a sign-up flow with social connections, @clerk/clerk-js was creating a new SignUpResource object, instead of patching the existing one.

    This was affecting Web3 sign-up flows, since the wallet ID was being overridden on the browser redirect.

  • Updated dependencies [d6a9b3f5d, 456b06849]:

@clerk/[email protected]

21 May 16:51
5272a9e
Compare
Choose a tag to compare

Minor Changes

  • Use the Google One Tap component from with Vanilla JS (#3409) by @panteliselef

    • Clerk.openGoogleOneTap({ cancelOnTapOutside: false, fedCmSupport: false, itpSupport: false })
    • 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 perform the correct redirections.

    google.accounts.id.initialize({
      callback: async response => {
        const signInOrUp = await Clerk.authenticateWithGoogleOneTap({ token: response.credential });
        await Clerk.handleGoogleOneTapCallback(signInOrUp, {
          afterSignInUrl: 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

@clerk/[email protected]

21 May 20:28
7ee868c
Compare
Choose a tag to compare

@clerk/[email protected]

21 May 16:51
5272a9e
Compare
Choose a tag to compare

Patch Changes

@clerk/[email protected]

21 May 20:28
7ee868c
Compare
Choose a tag to compare

@clerk/[email protected]

21 May 16:51
5272a9e
Compare
Choose a tag to compare

Minor Changes

Patch Changes

@clerk/[email protected]

21 May 20:28
7ee868c
Compare
Choose a tag to compare

Minor Changes

  • Consume and expose the 'saml_accounts' property of the user resource (#3405) by @chanioxaris

Patch Changes

@clerk/[email protected]

21 May 16:51
5272a9e
Compare
Choose a tag to compare

Patch Changes

@clerk/[email protected]

16 May 10:39
74ddb34
Compare
Choose a tag to compare

Minor Changes

  • Replace mount with open for GoogleOneTap. New api is __experimental_openGoogleOneTap. (#3379) by @panteliselef

@clerk/[email protected]

16 May 10:39
74ddb34
Compare
Choose a tag to compare

Patch Changes