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

DOCS - replacing the default authenticator #24

Closed

Conversation

antons-
Copy link

@antons- antons- commented Jul 8, 2019

Please see #23 for a description of this PR :)

I also noticed that some of the nav links were broken too, I've addressed this in the PR as well.


```
---
Name: authreset
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This block isn't actually required as the default authenticator is being specifically overwritten (eg. https://github.com/silverstripe/silverstripe-mfa/blob/master/_config/config.yml#L1-L10)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Normally I would agree with you, but when I tried it without the reset block, the member authenticator was still the default, even after /dev/build?flush=1

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following kinglozzer's comments, I'll remove the reset block :)

@ScopeyNZ
Copy link
Contributor

Thanks for the contribution! While what you've suggested would work well, I think we should probably suggest an example without the "reset" hackiness if we can avoid it.

@antons-
Copy link
Author

antons- commented Jul 10, 2019

No worries, see comments. I can remove the reset authenticator block if you prefer.

@kinglozzer
Copy link
Member

kinglozzer commented Jul 10, 2019

Can confirm the need to add a “reset” YAML block to remove the built-in authenticator, I had to do the exact same for https://github.com/bigfork/silverstripe-oauth-login#replacing-the-default-authenticator

Edit: actually, I think I needed to do that in my module because my authenticator has a name other than default. @ScopeyNZ is right - naming the key default should override it

@antons-
Copy link
Author

antons- commented Jul 10, 2019

I'm a little confused now. The YML snippet I added is exactly the same as the YML one in this section https://github.com/silverstripe/silverstripe-ldap/blob/master/docs/en/developer.md#show-the-ldap-login-button-on-login-form.

So now I'm wondering if I need to add my PR at all.

I should point out that when I tried this as written originally, I never saw an LDAP button on the login form as described. After /dev/build flush and then logging in, it still used the member authenticator.

I'm no longer working on the project using this module so I won't have time to go back and test some things unfortunately.

I have a question - Should an LDAP button be showing on the login form after adding this yml https://github.com/silverstripe/silverstripe-ldap/blob/master/docs/en/developer.md#show-the-ldap-login-button-on-login-form (is the current doc correct)?

  • If yes, it just seems odd the yml config documented for adding the ldap button is the same for making the ldap authenticator the default. Or is it just me?
  • If no, should the header "Show the LDAP Login button on login form" be renamed to "Set LDAP as default authenticator"?

@ScopeyNZ
Copy link
Contributor

Should an LDAP button be showing on the login form after adding this yml /docs/en/developer.md@master#show-the-ldap-login-button-on-login-form (is the current doc correct)?

Yes.

it just seems odd the yml config documented for adding the ldap button is the same for making the ldap authenticator the default. Or is it just me?

It does seem a little odd. The documentation seems to make the assumption that you will be using LDAP as a replacement authenticator - not as an alternative.

I think the docs can be a little clearer here, offering two alternatives for "replace" and "additonal". The additional one should just change default: to something else like ldap:.

@robbieaverill
Copy link
Contributor

robbieaverill commented Jul 25, 2019

Perhaps your issue with it not overloading the default authenticator key was caused by config block priority (e.g. Before: '#someconfig' and After: '#anotherconfig')?

Side note: were those TOC updates part of another change? We could keep those if so =)

@emteknetnz
Copy link
Member

This pull request hasn't had any activity for a while. Are you going to be doing further work on it, or would you prefer to close it now?

@antons-
Copy link
Author

antons- commented Sep 2, 2020

Let's close it. I haven't done SS dev in a while and won't be revisiting this anytime soon :)

@antons- antons- closed this Sep 2, 2020
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.

5 participants