Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules /

Discuss all other Modules here.

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

LoginForm for external authentication


Reply


4 Posts   2470 Views

Avatar
WalterW

Community Member, 18 Posts

30 May 2009 at 6:52pm

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

Avatar
lancer

57 Posts

4 June 2009 at 6:42am

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

Avatar
dayer

Community Member, 11 Posts

8 August 2010 at 7:54am

I have the same problem that WalterW.

Avatar
bcc2k

Community Member, 4 Posts

10 March 2011 at 4:30am

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.