Jump to content

Recommended Posts

Im trying to use Githubs version of AutoAuth:

I've followed the steps in the description, but are getting wrong login credentials error. Below you can see the different steps and the code that i have;

To install this script you need to place all files in your root directory of WHMCS
example: /home/user/public_html/domain/whmcs/
Generate a hash and enter it in configuration.php above the last ?>

$autoauthkey = "REPLACE-WITH-SYSTEM-KEY";
Also include it into the script.
You can generate a hash using; openssl rand -hex 32 on linux.
Then add this value to the top of your email template;

{assign var='hash' value=$client_email|cat:"REPLACE-THIS-PART-WITH-SECRET-KEY"}
Then add this link anywhere in your email template.
Login Auth: {$whmcs_url}lauth.php?email={$client_email}&zmkey={$hash|md5}
Invoice Auth: {$whmcs_url}iauth.php?email={$client_email}&invoice={$invoice_num}&zmkey={$hash|md5}
Quote Auth: {$whmcs_url}qauth.php?email={$client_email}&quote={$quote_number}&zmkey={$zmkey|md5}


Quick not for version 7+
Due to security settings, you have to modify configuration.php and add the following code to the bottom, above the last ?>

$smarty_security_policy = array(
    'mail' => array(
        'php_modifiers' => array(



In the config file:
$hash = "302BEA0FDBC6ADB8F8A25919318B532D";
$autoauthkey = "Correct_password";
$smarty_security_policy = array(
    'mail' => array(
        'php_modifiers' => array(




In the iauth file:

Created by JonTheWong @ Zenith Media Canada - www.zenithmedia.ca
Visit our public repo - https://github.com/JonTheWong/whmcs-autoauth-invoice

$whmcsurl = "https://www.webbsnacks.se/whmcs/dologin.php"; /* replace with your url */
$autoauthkey = "Correct_password"; /* same as in configuration.php */
$secretkey = "A_new_key_generated"; /* generate a new key for this script */

if (md5($_GET['email'].$secretkey) != $_GET['zmkey'])
die('Något fel har skett, vänligen kontakta oss på info@webbsnacks.se för att gå vidare.');

$email = $_GET['email'];
$timestamp = time();
$hash = sha1($email.$timestamp.$autoauthkey);
$goto = "viewinvoice.php?id=".$_GET['invoice'];

$url = $whmcsurl."?email=$email&timestamp=$timestamp&hash=$hash&goto=".urlencode($goto);
header("Location: $url");



Do anyone know what the issue might be? Since im not getting the "die" text, there should be nothing wrong with the hash, correct?

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • By jdiaz
      Hi everyone, sorry for the noob question.
      I noticed after a customer notified me this, that last year, the domain didn't sync and was marked as expired, so the new invoice was generated only for one service and the domain was not charged.
      For now, I manually marked it as active because on her profile was "Expired" but on Resellerclub, the domain is still active and being used and also tied to the same customer.
      So my question would be, what can I do so after I manually renew it this year, it also starts to be a billable item for the customer from now on as it was before something happened?
      Thanks in advance!
    • By Blasgo
      Good morning community
      How do I make all the services to be renewed appear on the "Customer Invoice"?
      In all "Customer Invoice" emails I only see that the hosting service appears and does not add the domain, both services were purchased the same day.
      The domain renewal is sent in different mail.
      I will greatly appreciate your help

    • By zitu4life
      Hello there
      On every WHMCS upgrade I usually go to cpanel>find wanted tpl file to edit LOGOS and footer and I was thinking if someone have found a way to create a litle automation on that to make thing easy.
      It inspiring more having my own logo on admin instead of looking all the time to WHMCS logo.

      Same thing for ADMIN LOGIN

      I think if those files are not encrypted we are allowed to change it, hope I am not only one who usually changed it 🤔🤔 That been said, if we could create a custom folder with our logo, and point a hook to looking for that logo and replace a WHMCS logo, so this will ensure on each upgrade will preserve our logo and not all the time goes to cpanel to edit tpl file.
      Same idea for Branded powerd by. Why not powerd by company, if I am paying for PLUS license every month even if my client number would be in STARTER tier, so I guess I can override WHMCS name there too.
      So there is any workaround? 
    • By Tengri
      For some reasons sometimes our banks don't accept invoice from customers without stamp, name of CEO and signature. Is there any way that when the user chooses payment via a Bank under the invoice had the name of the Director signature and stamp.
      Thank you!
    • By earthgirlllc
      Hi all
      I have one client that has over 1000 domains and over 60 hosting accounts, then some other services (SSL, etc). When they try to log in, or when I try to login as them (from the admin area or client area) it hangs until it times out. I increased the memory_limit to 640M and it finally loaded after about 45 seconds.  Before that, it gave me a 500 error.
      What can I adjust for clients of this size that makes logging in a bit easier?  I tested other templates and that's not the issue. Other clients with a normal amount of services are fine as well.
      Thank you!
  • Recently Browsing   0 members

    No registered users viewing this page.


Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated