Custom Auth Plugin for Login - Wrong Credentials

Custom Auth Plugin for Login - Wrong Credentials

by Frank Troglauer -
Number of replies: 2

Good afternoon,

I have successfully created a customized auth plugin to generate a custom login page. The issue we are having now is if a user inputs the wrong credentials they are sent to the front page instead of back to the login page. Does anyone know how we might redirect them back to the custom login page? Any advice here would be greatly appreciated!

Average of ratings: -
In reply to Frank Troglauer

Re: Custom Auth Plugin for Login - Wrong Credentials

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

One workaround might be to set $CFG->alternateloginurl to be your login page. If that is set that's where the user gets sent after a failed login attempt. 

In reply to Frank Troglauer

Re: Custom Auth Plugin for Login - Wrong Credentials

by Nikhil Bhalwankar -
Once you login to moodle using admin, search for a setting named Alternate Login URL. You need to set this to your custom login page. Moodle will automatically redirect to your page in case username/password is wrong.