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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

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

LoginForm for external authentication


Go to End


4 Posts   3325 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.