Jump to:

10929 Posts in 2613 Topics by 1809 members

All other Modules

SilverStripe Forums » All other Modules » LoginForm for external authentication

Discuss all other Modules here.

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

Page: 1
Go to End
Author Topic: 2356 Views
  • WalterW
    Avatar
    Community Member
    18 Posts

    LoginForm for external authentication Link to this post

    As we use the auth_external module to use our own authentication procedure, we have a working solution. But is not so nice.
    I have unregistered the normal member authentication process with

    Authenticator::unregister('MemberAuthenticator');
    Authenticator::register_authenticator('ExternalAuthenticator');

    both in mysite/_config.php and saphhire/_config.php

    But when I use the login form ($LoginForm) in template files (layout/myauth.ss), I still get the layout of the normal login form with Email and Password, what I cannot use.
    I tried to use $ExternalLoginForm, but this returns empty.

    Anybody has an idea about this?

    Walter

  • lancer
    Avatar
    57 Posts

    Re: LoginForm for external authentication Link to this post

    I put only
    Authenticator::unregister('MemberAuthenticator');
    in auth_external/_config.php

    It is all documented here:
    http://doc.silverstripe.org/doku.php?id=modules:external-authentication&s=auth external

    I only see the External Authentication Form

  • dayer
    Avatar
    Community Member
    11 Posts

    Re: LoginForm for external authentication Link to this post

    I have the same problem that WalterW.

  • bcc2k
    Avatar
    Community Member
    4 Posts

    Re: LoginForm for external authentication Link to this post

    Hi!
    I know it's a bit late but I found a solution to the problem.
    You have to override the function LoginForm in the page controller to get $LoginForm point to external authenticator instead of member authenticator:

    class Page_Controller extends ContentController {
    //...
       public function LoginForm() {
          return ExternalAuthenticator::get_login_form($this);
       }
    }

    With this you can use $LoginForm to display the external authenticator form.

    2356 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.