Removing Authentications from the Login Screen

Removing Authentications from the Login Screen

by Jared Wall -
Number of replies: 7

I recently updated to Moodle 3.11.6+. My institution configured the Google Login option and we are testing this in a DEV environment. I have the login set to show both the manual login and the login with other services option. Under login with other services, Google is the first option, however, there are also options displayed underneath for every service we have set up for MNET. Is there a way to have only the Google login display here without disabling those MNET auths? They are used for enrollments.


Thanks for any help.

Average of ratings: -
In reply to Jared Wall

Re: Removing Authentications from the Login Screen

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
Is there an option to disallow people logging in with the MNET? If so, that should remove it from the login screen.
In reply to Emma Richardson

Re: Removing Authentications from the Login Screen

by Jared Wall -
I have looked through the MNET authentication, authentication, Server: peers information and see no place to deselect this option. I know that on the authentication methods I can click the eye icon to disable the authentication, but I do not want to do that. I still need access to these enrollment methods and connections. I just want to remove the option to login as from the home screen list.
In reply to Jared Wall

Re: Removing Authentications from the Login Screen

by Ken Task -
Picture of Particularly helpful Moodlers

Been some time since I last used MNet ... but don't you have to have MNet Servers Block turned on in Homepage to see the servers that are configured for MNet and login into them?

If you could, screen shot (obscured links) would be nice!

You might have to either:
1. create a customized login page.
or
2. hide the button(s) for MNet via css

Is the link to MNet's below text that says:
"Log in using your account on:"  Then the buttons are below.
IF so, view the source of the page without being logged on.
Then search for that text.

Now to hide ... am not a css person but I see in a 3.8 version of moodle that uses Google, the following:

<div class="potentialidplist" class="mt-3">
<div class="potentialidp">

What does your MNet links buttons say?

Someone good at CSS might be able to tell you how to hide those buttons.

'SoS', Ken

In reply to Ken Task

Re: Removing Authentications from the Login Screen

by Jared Wall -
You are definitely onto what I found here. I may be wrong about this being an MNET issue and it may be something else, but when I did inspect the code for the page I found the same thing you did. Wondering if there is a way to remove these items from the Log in using your account on: list. I also found the potentialidp in the CSS, but have no idea how to edit that list. Was hoping there was somewhere these were actually listed and could be switched off.

See screenshot:
Image from login page
In reply to Jared Wall

Re: Removing Authentications from the Login Screen

by Ken Task -
Picture of Particularly helpful Moodlers

Wow!  That's a lotta MNet links! :|
Like I suggested ... #1 - you might have to create
a customized login page for that site to get desired login boxes/buttons to show.

That way you don't mess with css nor any core code - doing so might bite ya on
a site update or upgrade.

I've looked for a plugin, but didn't find one related.

Maybe I just didn't find:

https://moodle.org/plugins/

Like I said, I don't know CSS!

Here's a resource you might be able to use, though:
https://www.lmspulse.com/2021/moodle-login-page/#ThemesversusrawCSS

That page does suggest there are premium themes ($) that might have capability
built in ... just a matter $ and of config if they do exist.

There is an old conversation which provides an example of a custom login page ...you would have to edit am sure.

https://moodle.org/mod/forum/discuss.php?d=86952

'SoS', Ken

In reply to Ken Task

Re: Removing Authentications from the Login Screen

by Jared Wall -
Worked with one of our IT people who figured out how to limit the providers listed on the login box to one. Fortunately for us, the first one is the Google Login. All MNET logins are now hidden, but still useable to authenticate from incoming conneciton from the other MNET servers.

Here the custom CSS we placed into the Raw SCSS box in the new 4.0 boost theme:

.login-identityprovider-btn {
display: none;
}
.login-identityproviders a:first-of-type {
display: block;
}

login screen
In reply to Jared Wall

Re: Removing Authentications from the Login Screen

by Ken Task -
Picture of Particularly helpful Moodlers
Congrats!   Clever fellow .. however, that just hides from display ... doesn't really remove the code that's 'shipped' to the user browser, does it?

A user that's familiar with your logins of old and desiring to use something old as they had done in the past, could they create a quick local login page with code for an MNET?

Uhhhh ... trust no one! smile

'SoS', Ken