rabser / moodle-auth_googleoauth2

Oauth2 authentication plugin for Moodle (for Moodle 3.2 and earlier)
GNU General Public License v3.0
78 stars 78 forks source link

Allow accounts with same email #227

Open behoof opened 7 years ago

behoof commented 7 years ago

Hi mouneyrac,

In case I allow accounts with the same email (allowaccountssameemail) in moodle and an account with a certain email address exist, the linkedin authentication ends with an error: "Authentication method error.Please try to login again with your username and password."

The other way around: In case I have a already a linkedin account registered with that email address and I open a manual account with the same email address,... I'm able to login with both accounts

So, I assume that your very nice plugin doesn't permit opening an account with an existing email address, even if It's permitted it in moodle.

Do you consider this as a bug?

Best regards,

Bert

dashohoxha commented 7 years ago

I am not a Moodle expert, but I think that "allow accounts with the same email (allowaccountssameemail)" means that you 2 different accounts, which happens to have the same email address. I think that this is not the desired behaviour. The desired behaviour is to allow the user to authenticate and access his own account (the same account) either with username/password, or with oauth2 authentication. I don't know why it is so difficult.

dashohoxha commented 7 years ago

By the way, if a user needs to have different accounts with the same email address, he can change the email address of one account from username@gmail.com to username+1@gmail.com (many mail servers ignore the part after +). This trick works in many applications and it works in Moodle too.

mouneyrac commented 7 years ago

Hi, I didn't know it worked the other way around (maybe it is only in a recent Moodle version). I added the label Bug to the issue. That said this issue is a duplicate of many other issues (need some tracker cleaning). Thanks for the report anyway, it is good to know it works the other way :)

mouneyrac commented 7 years ago

the original #79