Official Javascript repository for Clerk authentication
MIT License
Published by clerk-cookie 5 months ago
456b06849
, 6888594cc
]:
Published by clerk-cookie 5 months ago
d6a9b3f5d
, 456b06849
, 6888594cc
]:
Published by clerk-cookie 5 months ago
Add support for GoogleOneTap. New APIs listed: (#3392) by @panteliselef
<GoogleOneTap/>
Customize the UX of the prompt
<GoogleOneTap
cancelOnTapOutside={false}
itpSupport={false}
fedCmSupport={false}
/>
Clerk.openGoogleOneTap(props: GoogleOneTapProps)
Clerk.closeGoogleOneTap()
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,
});
}
},
});
d6a9b3f5d
, 456b06849
]:
Published by clerk-cookie 5 months ago
d6a9b3f5d
, 456b06849
, 6888594cc
]:
Published by clerk-cookie 5 months ago
Add support for GoogleOneTap. New APIs listed: (#3392) by @panteliselef
<GoogleOneTap/>
Customize the UX of the prompt
<GoogleOneTap
cancelOnTapOutside={false}
itpSupport={false}
fedCmSupport={false}
/>
Clerk.openGoogleOneTap(props: GoogleOneTapProps)
Clerk.closeGoogleOneTap()
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,
});
}
},
});
d6a9b3f5d
, 456b06849
, 6888594cc
]:
Published by clerk-cookie 5 months ago
456b06849
, 6888594cc
]:
Published by clerk-cookie 5 months ago
62f8af286
, d6a9b3f5d
, 456b06849
]:
Published by clerk-cookie 5 months ago
Published by clerk-cookie 5 months ago
Add support for GoogleOneTap. New APIs listed: (#3392) by @panteliselef
<GoogleOneTap/>
Customize the UX of the prompt
<GoogleOneTap
cancelOnTapOutside={false}
itpSupport={false}
fedCmSupport={false}
/>
Clerk.openGoogleOneTap(props: GoogleOneTapProps)
Clerk.closeGoogleOneTap()
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,
});
}
},
});
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
]:
Published by clerk-cookie 5 months ago
62f8af286
, d6a9b3f5d
, 456b06849
]:
Published by clerk-cookie 5 months ago
456b06849
]:
Published by clerk-cookie 5 months ago
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'
Published by clerk-cookie 5 months ago
fcc349cb5
]:
Published by clerk-cookie 5 months ago
fcc349cb5
]:
Published by clerk-cookie 5 months ago
fcc349cb5
, fcc349cb5
]:
Published by clerk-cookie 5 months ago
Add support for GoogleOneTap (#3409) by @panteliselef
<GoogleOneTap/>
Customize the UX of the prompt
<GoogleOneTap
cancelOnTapOutside={false}
itpSupport={false}
fedCmSupport={false}
/>
fcc349cb5
]:
Published by clerk-cookie 5 months ago
Add support for GoogleOneTap (#3409) by @panteliselef
<GoogleOneTap/>
Customize the UX of the prompt
<GoogleOneTap
cancelOnTapOutside={false}
itpSupport={false}
fedCmSupport={false}
/>
fcc349cb5
, fcc349cb5
]:
Published by clerk-cookie 5 months ago
fcc349cb5
]:
Published by clerk-cookie 5 months ago
fcc349cb5
, fcc349cb5
]:
Published by clerk-cookie 5 months ago
fcc349cb5
]: