Google: “Error 400: redirect_uri_mismatch”

Users in my website keep getting this error everytime they choose to sign in using google.
I have had a look at related public questions to find a solution, but nothing seems to work, because my code is slightly different.

Here is what the REGISTER page does in this case:

require_once __DIR__ . "/data_inc/google.php";
$loginURL = $gClient->createAuthUrl();
<a onclick="window.location = '<?=$loginURL?>'" class="oauth-container btn darken-4 white black-text" style="text-transform:none">
        <div class="left">
            <img style="margin-top:7px; margin-right:8px" alt="Google sign-in" 
                src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/53/Google_%22G%22_Logo.svg/512px-Google_%22G%22_Logo.svg.png" />
        </div>
        With Google
    </a>

Here is the code which does the main part, which is google.php

session_start();
 require_once "/home/tonevrec/public_html/vendor/autoload.php";
 $gClient = new Google_Client();
 $gClient->setClientId("92382394890-324098239048239084id0234824.apps.googleusercontent.com");
 $gClient->setClientSecret("GNALER-l_wO1DJwbcjUNa02812l7KlS6p");
 $gClient->setApplicationName("Tonevre");
 $gClient->addScope(scope_or_scopes:"https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/userinfo.email");
 $gClient->setRedirectUri('https://tonevre.com');

Does anyone know what I should do; Download anything, write new code, or even remove something? If anybody needs more details, please send a message. Thank you for reading!