Jump to:

23376 Posts in 18274 Topics by 2867 members

General Questions

SilverStripe Forums » General Questions » Login as someone else - Error: Passed invalid authentication method

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1983 Views
  • Terminator4
    Avatar
    Community Member
    81 Posts

    Login as someone else - Error: Passed invalid authentication method Link to this post

    Hi Guys,
    When I press the button "log in as someone else", I get the following error. Please assist with resolving the issue. I am currently using SS 2.3 for the website I am constructing. Thanks

    [User Error] Passed invalid authentication method
    POST /websiteX/Security/LoginForm

    Line 215 in F:\xampp\htdocs\websiteX\sapphire\security\Security.php

  • Terminator4
    Avatar
    Community Member
    81 Posts

    Re: Login as someone else - Error: Passed invalid authentication method Link to this post

    I figured out a solution. In sapphire/Security/MemberLoginForm.php you need to edit line 57

    change from:

    $actions = new FieldSet(new FormAction("logout", _t('Member.BUTTONLOGINOTHER', "Log in as someone else")));

    to the following:

    $actions = new FieldSet(new HiddenField("AuthenticationMethod", null, $this->authenticator_class, $this),
    new FormAction("logout", _t('Member.BUTTONLOGINOTHER', "Log in as someone else"))
    );

    If someone can put this on the ticketing system as a fault that would be great otherwise I will do so when I get around to it sometime. Hope this solution helps anyone that was having the same issue.

  • chrisdarl
    Avatar
    Community Member
    33 Posts

    Re: Login as someone else - Error: Passed invalid authentication method Link to this post

    I had the same problem recently, on a custom template. But I realised that I didn't have <% base_tag %> in my <head> on the template Page.ss

    Seemed to go away when I added this

    1983 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.