what the auth method do you recommend, my Moodle version 3.1 ??
How to login to multiple Moodle sites with just one time login?
Re: How to login to multiple Moodle sites with just one time login?
How are the users to be managed:
- Are they in an existing system that you want to use as the backend?
- Or do you want to add users to a "main" Moodle site and have the other Moodle sites authenticate with that?
For option 1 you'll need to implement an SSO service around this system, e.g. use SimpleSAMLphp (SSp) to set up a SAML Identity Provider then Moodle sites could use SAML2 for SSO, some development work may be required to interface with this system. Depending on the format passwords are stored in it may not be possible to verify any existing passwords.
For option 2 you'll need to implement an SSO server service around the "main" Moodle site. Again you could use SSp as described above and some development work would be needed to verify users against the mdl_user database table of this "main" Moodle site. You would then need to configure the remaining Moodle sites with the corresponding authentication plugin, e.g. SAML2 Single sign on.
Alternatively for option 2 you could use the local_oauth plugin to make the "main" Moodle site an OAuth 2 issuer. This plugin isn't very well supported but should work for this scenario. There are some details here.
This reply may also be helpful.
Moodle 3.1 support ended in May 2019 so you should plan to upgrade these sites to continue receiving fixes and security updates. You will need to check any plugins are compatible with the site versions in use.
Re: How to login to multiple Moodle sites with just one time login?
Re: How to login to multiple Moodle sites with just one time login?
Setting up an SAML2 or other SSO solution is definitely the best option for the longer term, but it’s also quite complicated to achieve.
If you want something that is already built into Moodle and works out of the box without anything needing to be set up externally, you could use MNET, which was designed for networking Moodle sites (although it’s supposed to be being deprecated at some point). I use it to allow users from Moodle A to Moodle B without having to have separate accounts.
See https://docs.moodle.org/31/en/MNet
If you were on a later version of Moodle, you could set up sign in via an existing service (eg. Microsoft, Facebook, Google) - https://docs.moodle.org/39/en/OAuth_2_authentication
Re: How to login to multiple Moodle sites with just one time login?
1) Same time on both moodle error -- i checked time is same on both instances.
2) Also refreshed the keys on both moodle instances.
3) check url - url working also ssl enabled
" Ooops! Your MNET communication has failed! Here's that error message to pass on to your administrator: Connection timed out after 60001 millisecondsERROR 28:
"
Re: How to login to multiple Moodle sites with just one time login?
Maybe something overlooked ... 'different moodle instances with one source code'.
Maybe Ahmed could share what his config.php file looks like.
'SoS', Ken
Re: How to login to multiple Moodle sites with just one time login?
Is cURL enabled on your server?
And can you explain what you mean by “we have different moodle instances with one source code”.
Re: How to login to multiple Moodle sites with just one time login?
yes Jon CURL is enabled on on server.
all requirements are complete but Mnet get stuck on this error, don't know, is it deprecation issue or something else.
Re: How to login to multiple Moodle sites with just one time login?
Have you got unique session cookie ids on all your Moodle installations? See https://docs.moodle.org/31/en/Session_handling#Cookie_prefix
And you have a daily unusual set up with one codebase serving many databases. What are the settings in your config file?