Over the holidays I upgrade a few clients from Moodle 3.5 to Moodle 3.6. The upgrades were pretty straight forward and went as expected… except on one site.
After the upgrade, the site loaded successfully and presented the login screen to me. Everything looked normal, except that I could not log in. Each time I tried to log in, the login screen simply reloaded. Even resetting my password did not resolve the issue.
The site uses a theme that I have customised from the Boost theme. Moodle has introduced a new security feature that requires an additional token. You can read more about this new feature here: https://docs.moodle.org/dev/Login_token
The link above also provided me with a guide as to where the problem with my custom theme was. What I needed to do was quite simply update the loginform.mustache template, and add in the logintoken field. The file can be found here: \theme\boost\templates\core\loginform.mustache
In the image below you can see what must be added to the login form, allowing the login to work once more.
The site does not allow guest logins, so there was no need to also fix the guest login form. If you are allowing guest logins, then remember to scroll down to the guest login form and also update that.