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

Add filters for email token and backup code length #653

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

kasparsd
Copy link
Collaborator

@kasparsd kasparsd commented Dec 2, 2024

Fixes #374.

Replaces #419.

What?

Implements two new filters:

  • two_factor_token_length filter overrides the default 8 character count for email tokens. Note that I didn't include email anywhere to match the existing two_factor_token_ttl filter which applies to email tokens.

  • two_factor_backup_code_length filter overrides the default 8 character count for backup codes. Providers the WP_User of the associated user as the second argument.

Why?

Users might want to increase this.

How?

Testing Instructions

Screenshots or screencast

Changelog Entry

Added - Introduce two_factor_token_length and two_factor_backup_code_length filters for adjusting the length of the respective tokens.

@kasparsd
Copy link
Collaborator Author

kasparsd commented Dec 2, 2024

This is ready for code review.

@kasparsd kasparsd added this to the 0.11.0 milestone Dec 2, 2024
@jeffpaul jeffpaul requested a review from dd32 December 2, 2024 22:42
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.

Backup Codes (Improve 8 to 12 numbers)
1 participant