Page 1 of 1

Automatic login html page

Posted: Wed Nov 27, 2024 8:49 pm
by theUsername
I'm trying to create a local html file which, upon opening, will automatically load the hesk admin site and login.
So far I have this:

<form id="form1" action="https://thewebsite.com/help/admin/index.php" method="post">
<input type=hidden name="regInputUsername" value="theusername"/>
<input type=hidden name="regInputPassword" value="thepassword"/>
<input type=hidden name="a" value="do_login"/>
</form>
<script>
window.onload = function() {
document.getElementById('form1').submit();
};
</script>

This doesn't seem to work. It loads the site, but has an error saying to enter the username and password. Any idea on what I'm missing? I'm not the best at this. Thank you in advance!

Jim

Re: Automatic login html page

Posted: Fri Nov 29, 2024 8:10 pm
by Klemen
Instead of regInputUsername and regInputPassword use

Code: Select all

name="user"
and

Code: Select all

name="pass"

Re: Automatic login html page

Posted: Mon Dec 02, 2024 7:41 pm
by theUsername
That was it!!! I was looking at the label and not the name! Thank you!