Skip to content

Conversation

@saenyakorn
Copy link
Member

Why did you create this PR

To let user manually verify pin in onOtpVerify options. Which, sometimes, they need verify by themself, not third-party. Here's the use case

Case 1: Third Party manage PIN by itself.

signUp: {
  onOtpSent: () => {
    // managed by third-party which does not return pin
    return { refCode: refCode, token: token }
  },
  onOtpVerify: () => {
    // verify via third-party
    return await ThirdPary.verify(pin)
  }
}

Case 2: PIN is managed by developers

signUp: {
  onOtpSent: () => {
    // generated refCode, token, and PIN 
    return { refCode: refCode, token: token,  pin: pin }
  },
  // no need to provide onOtpVerify
}

What did you do

Screenshots / Recordings

Checklist

  • Self-reviewed your code
  • Wrote coverage tests
  • Added screenshots or recordings if applicable

@changeset-bot
Copy link

changeset-bot bot commented Sep 5, 2025

🦋 Changeset detected

Latest commit: 2d91714

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

This PR includes changesets to release 8 packages
Name Type
@genseki/plugins Minor
@example/erp Patch
@genseki/react Minor
@genseki/next Minor
@genseki/rest Minor
@genseki/react-query Minor
@genseki/prisma-generator Minor
@example/ui-playground 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

@saenyakorn saenyakorn changed the title [Feature] Enable provide pin to manual pin verification [Feature] Implement self-managed PIN on Phone Plugin Sep 5, 2025
@saenyakorn saenyakorn merged commit 7b059f6 into main Sep 5, 2025
1 check passed
@saenyakorn saenyakorn deleted the yu/fix/phone-forgot-password branch September 5, 2025 17:06
@github-actions github-actions bot mentioned this pull request Sep 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants