Hi guys.
I am currently trying to configure my Moodle as a Service Provider (SP) using SAML. I have already configured correctly my Identity Provider (IDP). And to be able to contact it from my Moodle (SP) I am using the plugin: SAML2 Single sign on.
Everything is fine up to a certain point.
When I try to authenticate for the first time from Moodle, everything works great. However if I logout and log in again I get the following error:
Login error
Can't create a new account, because xxxxx@xxxx.xxx email address is already registered
And the authentication is not successful.
I have configured the plugin to register the user account in Moodle the first time I perform the authentication (using the plugin option: Auto create users).
I don't understand the inner workings, but shouldn't it bypass this if the account is already in the system?
I have also seen that in the general authentication section there is an option called: Prevent account creation when authenticating. But I have it disabled, because I want the account to be created when the user authenticates for the first time.
My questions: How do I get the user to authenticate and the system does not try to create the account in moodle if it is already created? Because at the moment I can't re-authenticate.
What changes should I make in the system, should I program something?