General developer forum

Custom Login Page in Moodle 3.2

Picture of Umar Farooq
Custom Login Page in Moodle 3.2


I have successfully implemented the SSO using Oauth2 and "Log in with Google" button is dosplayed on log in page. On log in page for users I only want to show the  "Log in with Google" button and hide log in form. A solution like given in this post . But, in moodle 3.2 moodle/login/index_form.html has been removed.

How can I customize my page at to only show the "Log in with Google" button or alternatively use a custom log in page and keep this page for admin access only.


Average of ratings: Useful (1)
Dan at desk in Moodle HQ, Perth
Re: Custom Login Page in Moodle 3.2
Average of ratings: -
Picture of Luis Ibhiabor
Re: Custom Login Page in Moodle 3.2

Hello Dan,

I am using the boost theme in moodle 3.2. I would also like to customize my login page. I just want to have the 'Username', 'Password', 'Login' fields and a logo (not site title) displayed on the login page.

Thanks for giving directions to the current location for the login.mustache files. However, I have a question. Are you suggesting one edits the core module? Is there an easy way to style it with css by increasing the width of the username and password fields, and hide other sections that are not required to be displayed but by not editing any core module?

Attached is a screenshot of the current login page that I would like to customize to something else please.


Average of ratings: -
Picture of Farney Jiménez
Re: Custom Login Page in Moodle 3.2

Hi Dan, thanks for this answer, it has helped me.

Average of ratings: -
Picture of Guillermo Dova
Re: Custom Login Page in Moodle 3.2

To avoid editing core files nor setting up an alternate login page, I´ve been able to show only the "login in with google" button by hidding the other elements with CSS.

For example, in Boost theme, just add this to Boost theme > advanced settings > raw SCSS

form#login input#username,
form#login input#password,
form#login div.rememberpass,
form#login button#loginbtn{
Average of ratings: Useful (2)