Skip to content

fix(elements): Prevent multiple verification codes from being sent - #3305

Merged
brkalow merged 2 commits into
tm.elements/add-appropriate-invalid-config-msgfrom
brk.fix/elements-multiple-prepare
May 1, 2024
Merged

fix(elements): Prevent multiple verification codes from being sent#3305
brkalow merged 2 commits into
tm.elements/add-appropriate-invalid-config-msgfrom
brk.fix/elements-multiple-prepare

Conversation

@brkalow

@brkalow brkalow commented May 1, 2024

Copy link
Copy Markdown
Member

Description

Fixes an issue where multiple prepare calls were being fired, resulting in multiple verification codes being sent. We're doing this by relying on the response from FAPI, which contains an expireAt property indicating when the code is expired. If it's not expired, we won't send a new prepare call by default.

Checklist

  • npm test runs as expected.
  • npm run 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:

@brkalow
brkalow requested a review from tmilewski May 1, 2024 19:46
@changeset-bot

changeset-bot Bot commented May 1, 2024

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: aa11e08

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

This PR includes changesets to release 1 package
Name Type
@clerk/elements Patch

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

Comment thread packages/elements/src/react/sign-in/context/router.context.ts Outdated
@brkalow
brkalow changed the base branch from main to tm.elements/add-appropriate-invalid-config-msg May 1, 2024 19:48
@brkalow
brkalow merged commit 8c25cdb into tm.elements/add-appropriate-invalid-config-msg May 1, 2024
@brkalow
brkalow deleted the brk.fix/elements-multiple-prepare branch May 1, 2024 19:49
@LekoArts LekoArts added this to the @clerk/elements (Beta) milestone May 6, 2024
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.

4 participants