[PR #710] [MERGED] feat: add support for configurable digits length #29045

Closed
opened 2026-04-17 20:26:47 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/710
Author: @Kaseax
Created: 12/1/2024
Status: Merged
Merged: 12/1/2024
Merged by: @Bekacru

Base: mainHead: feat/otp-digits-length


📝 Commits (4)

  • 594763d feat: add support for configurable digits length (#653)
  • 42b1bf1 fix: use configurable digits length instead of defaulting to 6 in totp
  • 78b5082 feat: move twofa otp to use random string instead of totp code
  • d6616c2 docs: update 2fa docs

📊 Changes

3 files changed (+26 additions, -10 deletions)

View changed files

📝 docs/content/docs/plugins/2fa.mdx (+1 -1)
📝 packages/better-auth/src/plugins/two-factor/otp/index.ts (+24 -8)
📝 packages/better-auth/src/plugins/two-factor/totp/index.ts (+1 -1)

📄 Description

This pull request closes #653 . It adds the option, to make the digit length of otp configurable.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/710 **Author:** [@Kaseax](https://github.com/Kaseax) **Created:** 12/1/2024 **Status:** ✅ Merged **Merged:** 12/1/2024 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `main` ← **Head:** `feat/otp-digits-length` --- ### 📝 Commits (4) - [`594763d`](https://github.com/better-auth/better-auth/commit/594763d1547a3eaf3f8bfa10e10a09d931283edb) feat: add support for configurable digits length (#653) - [`42b1bf1`](https://github.com/better-auth/better-auth/commit/42b1bf16752d9322e0648d10a7c2c9cade654a8c) fix: use configurable digits length instead of defaulting to 6 in totp - [`78b5082`](https://github.com/better-auth/better-auth/commit/78b5082747bba8c5d8da1a1bdf4989602ab322fe) feat: move twofa otp to use random string instead of totp code - [`d6616c2`](https://github.com/better-auth/better-auth/commit/d6616c2afc37a072a7862f0376608f0214b39ffb) docs: update 2fa docs ### 📊 Changes **3 files changed** (+26 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/plugins/2fa.mdx` (+1 -1) 📝 `packages/better-auth/src/plugins/two-factor/otp/index.ts` (+24 -8) 📝 `packages/better-auth/src/plugins/two-factor/totp/index.ts` (+1 -1) </details> ### 📄 Description This pull request closes #653 . It adds the option, to make the digit length of otp configurable. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-17 20:26:47 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#29045