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

Add option to alt_auth plugin #5107

Closed
Alex-e107nl opened this issue Nov 18, 2023 · 5 comments
Closed

Add option to alt_auth plugin #5107

Alex-e107nl opened this issue Nov 18, 2023 · 5 comments
Labels
type: enhancement An improvement or new feature request type: question An ask about behavior that is not found documented anywhere
Milestone

Comments

@Alex-e107nl
Copy link

Question

I would like to see the internal e107 database function as a secondary authorization type.

Expected Source

File e107_plugins/alt_auth/alt_auth_conf.php

line 185 of:

".$altAuthAdmin->alt_auth_get_dropdown('auth_method2', varset($pref['auth_method2']), 'none')."

change to:

".$altAuthAdmin->alt_auth_get_dropdown('auth_method2', varset($pref['auth_method2']), 'e107')."

Additional Context

For a large website (2000+ members) I have an e107 cms which retrieves the login data from a separate database, so it only concerns a name and password, which are retrieved and imported with the alt_auth plugin.

That works fine, but now my question is, if the password is changed in the external database, this does not happen in the data that has previously been retrieved for a member and so you have to delete the existing account so that the new data is imported again when that member logs in.

I have tested and it turns out that if I use the external database as main and the internal e107 database as secondary, it works well, a password change is simply adopted!

I just can't see what could possibly cause problems with this setup, but so far it's working fine, could this be changed in e107?

@Alex-e107nl Alex-e107nl added the type: question An ask about behavior that is not found documented anywhere label Nov 18, 2023
@CaMer0n
Copy link
Member

CaMer0n commented Nov 20, 2023

Thanks @Alex-e107nl

I believe what you require is this option, correct?

image

I will add it. please let me know if it works for you.

Thanks.

@CaMer0n CaMer0n added this to the e107 2.3.3 milestone Nov 20, 2023
@CaMer0n CaMer0n added the type: enhancement An improvement or new feature request label Nov 20, 2023
CaMer0n added a commit that referenced this issue Nov 20, 2023
@Jimmi08
Copy link
Contributor

Jimmi08 commented Nov 21, 2023

Result for me with this change:

  • primary - 2x e107

image

I was able to use only e107 + e107db combination in case like this (when active and primary db should be separate e107 database) and for failed actions using secondary authentication. If the user changes the password in e107db (external), then login in the actual site fails but secondary authentication is used and login is successful (at least nobody complained about this for now).

Change from Alex is the correct one, you will get e107 listed in the second authentication but updating the password from e107db as primary auth to actual e107 db is not supported (after successful login with e107db as primary). I suppose that this was what he was asking for. Maybe I am wrong.

@Alex-e107nl
Copy link
Author

I have tested it, i can use the internal e107 database function as a secondary authorization now, the 2 e107 options in the Primary authorisation is a little confusing.... I use it like in this image now:

e107_auth_second

I can change the password in the otherdb and it also changes in the internal e107 database! Perfectly!

@Moc
Copy link
Member

Moc commented Nov 21, 2023

@Alex-e107nl Just a note for the future: for issues like these (and your newsfeed issue), where you are requesting new functionality or changes to existing functionality, please submit it as a "feature request" rather than a "question".

"Questions" are more used for things like "how do I use this functionality?" or "Can e107 do this or that?". Hopefully it makes sense when you see the issue templates. If not, let me know and we can make some adjustments.

Thanks! 👍

@Alex-e107nl
Copy link
Author

Thank you Tijn, I will keep that in mind, I am very happy that Camer0n has adjusted it, and maybe others will find it useful too!

@CaMer0n CaMer0n changed the title [Question]: Proposal to adjust alt_auth plugin.. Add option to alt_auth plugin Nov 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement An improvement or new feature request type: question An ask about behavior that is not found documented anywhere
Projects
None yet
Development

No branches or pull requests

4 participants