Description of the bug
It's not possible to log into the saml2sso plugin from the Moodle Mobile app when the saml2sso plugin is enabled because the returned JSON from this AJAX post request isn't valid:
/lib/ajax/service.php?info=tool_mobile_get_public_config
The reason why the JSON isn't valid is because different data types are returned from the loginpage_idp_list() method in the saml2sso plugin.
**How to reproduce**
1. Install and set up the Moodle Mobile app on the Moodle site.
2. Login to the Moodle Mobile app and check that everything works as expected.
3. Install the saml2sso auth plugin on the site.
4. Enable the plugin. When the saml2sso plugin is enabled it won't be possible to log into the Moodle Mobile app.
5. Disable the saml2sso plugin and the Moodle Mobile app will work again.
JSON response can be seen on the Moodle Mobile app test site during login:
https://mobileapp.moodledemo.net
**Pull request to fix the bug**
This pull request fixes the bug and allows Mobile login when the saml2sso auth plugin is enabled. The pull request fixes another bug as well. It trims the config button name to make sure it doesn't contain white space(s) and therefore won't be assigned a value:
https://github.com/dmirandaa/moodle-auth_saml2sso/pull/35
Moodle version: 3.6.3+
Description of the bug It's not possible to log into the saml2sso plugin from the Moodle Mobile app when the saml2sso plugin is enabled because the returned JSON from this AJAX post request isn't valid: