I need to either remove or change the forgot password link from our login page (davistech.instructure.com) as shown below:
It currently does not work because we recently added a single sign on option which prevents users from resetting their own passwords. I was told by my CSM that the only way to change this is through custom JavaScript and since I know very minimal JavaScript I was hoping someone in the community could help me out.
Thanks
Solved! Go to Solution.
You should just be able to add the line below to your JavaScript file to remove the Forgot Password link from your Canvas login screen.
document.getElementsByClassName('ic-Login__forgot')[0].style.visibility = 'hidden';
While the line above works if you have other JS it may break it from being able to run the rest. So I have updated the code to include checking to see if you are on the login screen before triggering it to run.
if(document.URL.split('/')[3] === 'login'){
document.getElementsByClassName('ic-Login__forgot')[0].style.visibility = 'hidden';
}
Thanks @bneporadny that worked great.
Alternately, you can set their user "Authentication ID" to "canvas" using a SIS import. This will allow Canvas access to their password and give them the option to change it by email.
@timothy_maw , I've shared your question with the https://community.canvaslms.com/groups/admins?sr=search&searchId=aaae422f-c8ed-4549-a94e-8e30a519551... and https://community.canvaslms.com/groups/canvas-developers?sr=search&searchId=d3460981-dacd-4d36-9cae-... groups to attract experts' eyes.
You should just be able to add the line below to your JavaScript file to remove the Forgot Password link from your Canvas login screen.
document.getElementsByClassName('ic-Login__forgot')[0].style.visibility = 'hidden';
While the line above works if you have other JS it may break it from being able to run the rest. So I have updated the code to include checking to see if you are on the login screen before triggering it to run.
if(document.URL.split('/')[3] === 'login'){
document.getElementsByClassName('ic-Login__forgot')[0].style.visibility = 'hidden';
}
Thanks @bneporadny that worked great.
Alternately, you can set their user "Authentication ID" to "canvas" using a SIS import. This will allow Canvas access to their password and give them the option to change it by email.