Releases: clerk/javascript
Releases · clerk/javascript
@clerk/chrome-extension@1.0.14
@clerk/backend@1.2.1
gatsby-plugin-clerk@4.4.44
@clerk/types@4.5.0
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, }); } }, });
@clerk/types@3.65.0
Minor Changes
-
Added the following types (#3409) by @panteliselef
interface Clerk { ... openGoogleOneTap: (props?: GoogleOneTapProps) => void; closeGoogleOneTap: () => void; authenticateWithGoogleOneTap: (params: AuthenticateWithGoogleOneTapParams) => Promise<SignInResource | SignUpResource>; handleGoogleOneTapCallback: ( signInOrUp: SignInResource | SignUpResource, params: HandleOAuthCallbackParams, customNavigate?: (to: string) => Promise<unknown>, ) => Promise<unknown>; ... } type GoogleOneTapStrategy = 'google_one_tap'
@clerk/themes@2.1.7
Patch Changes
- Updated dependencies [
d6a9b3f5d
]:- @clerk/types@4.5.0
@clerk/themes@1.7.15
Patch Changes
- Updated dependencies [
fcc349cb5
]:- @clerk/types@3.65.0
@clerk/testing@1.1.3
@clerk/shared@2.2.0
Minor Changes
- Unpin the version of swr and allow any minor or patch version. (#3399) by @panteliselef