Releases: clerk/javascript
@clerk/[email protected]
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 newSignUpResource
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]
- @clerk/[email protected]
@clerk/[email protected]
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
- Updated dependencies [
fcc349cb5
]:- @clerk/[email protected]
- @clerk/[email protected]
@clerk/[email protected]
Patch Changes
- Updated dependencies [
62f8af286
,d6a9b3f5d
,456b06849
]:- @clerk/[email protected]
- @clerk/[email protected]
- @clerk/[email protected]
@clerk/[email protected]
Patch Changes
- Updated dependencies [
fcc349cb5
,fcc349cb5
]:- @clerk/[email protected]
- @clerk/[email protected]
@clerk/[email protected]
Patch Changes
- Updated dependencies [
62f8af286
,d6a9b3f5d
,456b06849
]:- @clerk/[email protected]
- @clerk/[email protected]
- @clerk/[email protected]
@clerk/[email protected]
Minor Changes
- Update export snapshot tests to include
GoogleOneTap
. (#3409) by @panteliselef
Patch Changes
- Updated dependencies [
fcc349cb5
,fcc349cb5
]:- @clerk/[email protected]
- @clerk/[email protected]
@clerk/[email protected]
Minor Changes
- Consume and expose the 'saml_accounts' property of the user resource (#3405) by @chanioxaris
Patch Changes
- Updated dependencies [
456b06849
]:- @clerk/[email protected]
@clerk/[email protected]
Patch Changes
- Updated dependencies [
fcc349cb5
]:- @clerk/[email protected]
@clerk/[email protected]
Minor Changes
- Replace mount with open for GoogleOneTap. New api is
__experimental_openGoogleOneTap
. (#3379) by @panteliselef
@clerk/[email protected]
Patch Changes
- Updated dependencies [
3d790d5ea
]:- @clerk/[email protected]