Skip to content

fix: correct config keys and hardcoded threshold in OneTimeLoginLinkB…#1178

Merged
steinkel merged 1 commit into16.next-cake5from
fix/one-time-login-behavior
Apr 12, 2026
Merged

fix: correct config keys and hardcoded threshold in OneTimeLoginLinkB…#1178
steinkel merged 1 commit into16.next-cake5from
fix/one-time-login-behavior

Conversation

@steinkel
Copy link
Copy Markdown
Member

…ehavior

  • Read threshold from OneTimeLogin.thresholdTimeout config (was hardcoded to 10s)
  • Read token lifetime from OneTimeLogin.tokenLifeTime (was wrongly prefixed with Auth.)

…ehavior

- Read threshold from OneTimeLogin.thresholdTimeout config (was hardcoded to 10s)
- Read token lifetime from OneTimeLogin.tokenLifeTime (was wrongly prefixed with Auth.)
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes One-Time Login (Magic Link) configuration lookups so the behavior uses the intended config keys and no longer relies on a hardcoded resend threshold.

Changes:

  • Read the resend threshold from OneTimeLogin.thresholdTimeout (previously hardcoded to 10 seconds).
  • Read token lifetime from OneTimeLogin.tokenLifeTime (previously looked up under the incorrect Auth. prefix).
  • Update the corresponding unit test config key to match the corrected behavior.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/Model/Behavior/OneTimeLoginLinkBehavior.php Uses OneTimeLogin.thresholdTimeout for resend throttling and fixes token lifetime config key to OneTimeLogin.tokenLifeTime.
tests/TestCase/Model/Behavior/OneTimeLoginLinkBehaviorTest.php Updates test configuration to use the corrected OneTimeLogin.tokenLifeTime key.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@steinkel steinkel merged commit a20f3c0 into 16.next-cake5 Apr 12, 2026
30 checks passed
@steinkel steinkel deleted the fix/one-time-login-behavior branch April 12, 2026 18:40
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