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

Allow string only TwoFactorProcessor URLs #89

Open
LordSimal opened this issue Jul 13, 2024 · 0 comments
Open

Allow string only TwoFactorProcessor URLs #89

LordSimal opened this issue Jul 13, 2024 · 0 comments

Comments

@LordSimal
Copy link
Contributor

LordSimal commented Jul 13, 2024

It would be nice if the TwoFactorMiddleware would allow string only verify urls as well like this:

    'OneTimePasswordAuthenticator' => [
        'login' => true,
        'verifyAction' => '/verify',
    ],

Currently, it requires an array syntax for URLs which only works if the Router is preloaded with the routes via the RoutingMiddleware.

But I need this so that I can move the RoutingMiddleware AFTER both Auth middlewares and show nice error messages as a logged in user if someone tries to access an unknown URL (but still show them their personalized e.g. menu or header icons)

  • CakePHP 5.1 RC1
  • CakeDC/Users 14.2.1
  • CakeDC/Auth 10.0.0
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

No branches or pull requests

1 participant