catalyst / moodle-auth_saml2

SAML done 100% in Moodle, fast, simple, secure
https://moodle.org/plugins/auth_saml2
70 stars 132 forks source link

Improve login UX by adding an optional splash login page. #703

Closed danmarsden closed 2 years ago

danmarsden commented 2 years ago

The sites we have where the users are split between SAML based users and manual/other accounts will often display the standard Moodle login page which contains a form asking for the users username and password, and then a button that allows the users to login via the SAML IDP.

The site logs for these sites are full of users who see a form on the page, enter their username and password (sometimes multiple times) before finally realising/remembering that they need to click a link on the page rather than using the login form.

IMO - we should not be presenting a user with a login form on the page at all but guiding them towards the right process using a splash page that displays the options based on the type of users that are trying to login.

I typically do this by writing a custom splash page for a client, however I think it makes sense for us to make this a feature within the saml plugin instead.

here's one example: https://moodle.op.ac.nz/local/otago/login.php

The splash page does the passive mode tests on it's own so if already logged into the IDP, the user doesn't see this page and they are automatically redirected.

If multiple IDPS are configured - we should display a button for each on the page, with a link to the "other users" page taking the user to the standard Moodle login page. (also allowing the admin to modify the text used for the "other users" link.

The splash page should be designed so that it's very easy to adjust using CSS - eg some sites we use make the IDP link very bold with icons etc and make the "other users" link quite small.

danmarsden commented 2 years ago

We ended up writing this into a new plugin here: https://moodle.org/plugins/local_login