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

feat(shared): Controllable useReverification #5183

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

octoper
Copy link
Member

@octoper octoper commented Feb 17, 2025

Description

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

@octoper octoper self-assigned this Feb 17, 2025
Copy link

vercel bot commented Feb 17, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
clerk-js-sandbox ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 18, 2025 11:37am

@octoper
Copy link
Member Author

octoper commented Feb 17, 2025

!snapshot

@clerk-cookie
Copy link
Collaborator

Hey @octoper - the snapshot version command generated the following package versions:

Package Version
@clerk/agent-toolkit 0.0.3-snapshot.v20250217151730
@clerk/astro 2.2.1-snapshot.v20250217151730
@clerk/backend 1.24.2-snapshot.v20250217151730
@clerk/chrome-extension 2.2.10-snapshot.v20250217151730
@clerk/clerk-js 5.53.0-snapshot.v20250217151730
@clerk/elements 0.22.23-snapshot.v20250217151730
@clerk/clerk-expo 2.7.8-snapshot.v20250217151730
@clerk/expo-passkeys 0.1.21-snapshot.v20250217151730
@clerk/express 1.3.49-snapshot.v20250217151730
@clerk/fastify 2.1.22-snapshot.v20250217151730
@clerk/localizations 3.10.7-snapshot.v20250217151730
@clerk/nextjs 6.12.0-snapshot.v20250217151730
@clerk/nuxt 1.2.0-snapshot.v20250217151730
@clerk/clerk-react 5.23.0-snapshot.v20250217151730
@clerk/react-router 1.1.0-snapshot.v20250217151730
@clerk/remix 4.5.0-snapshot.v20250217151730
@clerk/shared 2.22.0-snapshot.v20250217151730
@clerk/tanstack-start 0.10.0-snapshot.v20250217151730
@clerk/testing 1.4.23-snapshot.v20250217151730
@clerk/themes 2.2.19-snapshot.v20250217151730
@clerk/types 4.46.1-snapshot.v20250217151730
@clerk/ui 0.3.24-snapshot.v20250217151730
@clerk/vue 1.2.1-snapshot.v20250217151730

Tip: Use the snippet copy button below to quickly install the required packages.
@clerk/agent-toolkit

npm i @clerk/[email protected] --save-exact

@clerk/astro

npm i @clerk/[email protected] --save-exact

@clerk/backend

npm i @clerk/[email protected] --save-exact

@clerk/chrome-extension

npm i @clerk/[email protected] --save-exact

@clerk/clerk-js

npm i @clerk/[email protected] --save-exact

@clerk/elements

npm i @clerk/[email protected] --save-exact

@clerk/clerk-expo

npm i @clerk/[email protected] --save-exact

@clerk/expo-passkeys

npm i @clerk/[email protected] --save-exact

@clerk/express

npm i @clerk/[email protected] --save-exact

@clerk/fastify

npm i @clerk/[email protected] --save-exact

@clerk/localizations

npm i @clerk/[email protected] --save-exact

@clerk/nextjs

npm i @clerk/[email protected] --save-exact

@clerk/nuxt

npm i @clerk/[email protected] --save-exact

@clerk/clerk-react

npm i @clerk/[email protected] --save-exact

@clerk/react-router

npm i @clerk/[email protected] --save-exact

@clerk/remix

npm i @clerk/[email protected] --save-exact

@clerk/shared

npm i @clerk/[email protected] --save-exact

@clerk/tanstack-start

npm i @clerk/[email protected] --save-exact

@clerk/testing

npm i @clerk/[email protected] --save-exact

@clerk/themes

npm i @clerk/[email protected] --save-exact

@clerk/types

npm i @clerk/[email protected] --save-exact

@clerk/ui

npm i @clerk/[email protected] --save-exact

@clerk/vue

npm i @clerk/[email protected] --save-exact

Copy link

changeset-bot bot commented Feb 18, 2025

🦋 Changeset detected

Latest commit: 7375d71

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

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

Not sure what this means? Click here to learn what changesets are.

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

@octoper
Copy link
Member Author

octoper commented Feb 18, 2025

!snapshot

@octoper octoper force-pushed the vaggelis/user-1139-usereverification-to-work-with-custom-uis branch from 9112e95 to 7375d71 Compare February 18, 2025 11:36
@clerk-cookie
Copy link
Collaborator

Hey @octoper - the snapshot version command generated the following package versions:

Package Version
@clerk/agent-toolkit 0.0.3-snapshot.v20250218113640
@clerk/astro 2.2.1-snapshot.v20250218113640
@clerk/backend 1.24.2-snapshot.v20250218113640
@clerk/chrome-extension 2.2.10-snapshot.v20250218113640
@clerk/clerk-js 5.53.0-snapshot.v20250218113640
@clerk/elements 0.22.23-snapshot.v20250218113640
@clerk/clerk-expo 2.7.8-snapshot.v20250218113640
@clerk/expo-passkeys 0.1.21-snapshot.v20250218113640
@clerk/express 1.3.49-snapshot.v20250218113640
@clerk/fastify 2.1.22-snapshot.v20250218113640
@clerk/localizations 3.10.7-snapshot.v20250218113640
@clerk/nextjs 6.12.0-snapshot.v20250218113640
@clerk/nuxt 1.2.0-snapshot.v20250218113640
@clerk/clerk-react 5.23.0-snapshot.v20250218113640
@clerk/react-router 1.1.0-snapshot.v20250218113640
@clerk/remix 4.5.0-snapshot.v20250218113640
@clerk/shared 2.22.0-snapshot.v20250218113640
@clerk/tanstack-start 0.10.0-snapshot.v20250218113640
@clerk/testing 1.4.23-snapshot.v20250218113640
@clerk/themes 2.2.19-snapshot.v20250218113640
@clerk/types 4.46.1-snapshot.v20250218113640
@clerk/ui 0.3.24-snapshot.v20250218113640
@clerk/vue 1.2.1-snapshot.v20250218113640

Tip: Use the snippet copy button below to quickly install the required packages.
@clerk/agent-toolkit

npm i @clerk/[email protected] --save-exact

@clerk/astro

npm i @clerk/[email protected] --save-exact

@clerk/backend

npm i @clerk/[email protected] --save-exact

@clerk/chrome-extension

npm i @clerk/[email protected] --save-exact

@clerk/clerk-js

npm i @clerk/[email protected] --save-exact

@clerk/elements

npm i @clerk/[email protected] --save-exact

@clerk/clerk-expo

npm i @clerk/[email protected] --save-exact

@clerk/expo-passkeys

npm i @clerk/[email protected] --save-exact

@clerk/express

npm i @clerk/[email protected] --save-exact

@clerk/fastify

npm i @clerk/[email protected] --save-exact

@clerk/localizations

npm i @clerk/[email protected] --save-exact

@clerk/nextjs

npm i @clerk/[email protected] --save-exact

@clerk/nuxt

npm i @clerk/[email protected] --save-exact

@clerk/clerk-react

npm i @clerk/[email protected] --save-exact

@clerk/react-router

npm i @clerk/[email protected] --save-exact

@clerk/remix

npm i @clerk/[email protected] --save-exact

@clerk/shared

npm i @clerk/[email protected] --save-exact

@clerk/tanstack-start

npm i @clerk/[email protected] --save-exact

@clerk/testing

npm i @clerk/[email protected] --save-exact

@clerk/themes

npm i @clerk/[email protected] --save-exact

@clerk/types

npm i @clerk/[email protected] --save-exact

@clerk/ui

npm i @clerk/[email protected] --save-exact

@clerk/vue

npm i @clerk/[email protected] --save-exact

Comment on lines +244 to +263
useEffect(() => {
if (!optionsWithDefaults.controlled && isReVerificationInProgress) {
clerk.__internal_openReverification({
level: (verificationLevel as SessionVerificationLevel) || undefined,
afterVerification() {
reverificationCompleted();
},
afterVerificationCancelled() {
reverificationCancel();
},
});
}
}, [
verificationLevel,
clerk,
isReVerificationInProgress,
optionsWithDefaults.controlled,
reverificationCancel,
reverificationCompleted,
]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd avoid using a useEffect here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants