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

FIX throw error if invalid auth name passed in when multiple auth methods are set up #11651

Open
wants to merge 1 commit into
base: 5.3
Choose a base branch
from

Conversation

xini
Copy link
Contributor

@xini xini commented Mar 25, 2025

Description

When multiple authentication methods are defined, and an invalid authenticator is passed to the login function, e.g. /Security/login/huhu, a rendering error is thrown because the login form for that authenticator can't be found.

Manual testing steps

Set up multiple authentication methods:

SilverStripe\Core\Injector\Injector:
  SilverStripe\Security\Security:
    properties:
      Authenticators:
        default: '%$SilverStripe\Security\MemberAuthenticator\MemberAuthenticator'
        other: '%$SilverStripe\Security\MemberAuthenticator\MemberAuthenticator'

Call /Security/login/huhu. You then get the following error:

[User Warning] Authenticator "default" doesn't support tabbed forms

Issues

Pull request checklist

  • The target branch is correct
  • All commits are relevant to the purpose of the PR (e.g. no debug statements, unrelated refactoring, or arbitrary linting)
    • Small amounts of additional linting are usually okay, but if it makes it hard to concentrate on the relevant changes, ask for the unrelated changes to be reverted, and submitted as a separate PR.
  • The commit messages follow our commit message guidelines
  • The PR follows our contribution guidelines
  • Code changes follow our coding conventions
  • This change is covered with tests (or tests aren't necessary for this change)
  • Any relevant User Help/Developer documentation is updated; for impactful changes, information is added to the changelog for the intended release
  • CI is green

@michalkleiner michalkleiner changed the title FIX throw error if invalid auth name passed in when multiple ath methods are set up FIX throw error if invalid auth name passed in when multiple auth methods are set up Mar 26, 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.

1 participant