0

This is my first post so apologies for potentially odd formatting. I have recently began learning how to build websites, and I took a crack at figuring out how to successfully make an auth request w Google. The website is being built on VS Code (if that's relevant) and I am hosting it locally on http://127.0.0.1:5500/ . When I try to use the 'Sign in to Google' button, I receive the following error:

Error 400: invalid_request Permission denied to generate login hint for target domain.

In my Credentials, under both Authorized JavaScript origins & Authorized redirect URIs I've put both http://localhost as well as http://localhost:5500 just in case. I've tried hard reloading, clearing cache, using a different browser, creating a new credential, etc. but I can't seem to get it to work.

<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="google-signin-scope" content="profile email">
    <meta name="google-signin-client_id" content="529639775923-pkv25lslg535ngmsh6thj9t46upb9i8b.apps.googleusercontent.com">

    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
    <link rel="stylesheet" href="index.css">
    <title> name of site </title>
  </head>
  <body>
    <h2 class="alert alert-primary">Sign in w/ Google </h2>
    <div class="g-signin2" data-onsuccess="onSignIn" data-theme="dark"></div>
    <div class="data">
        <p>Name</p>
        <p id="name" class="alert alert-success"></p>
        <p>Profile Pic</p>
        <img id="image" class="rounded-circle" width="100" height="100"/>
        <p>Email</p>
        <p id="email"></p>
        <button type="button" class="btn btn-danger" onclick="signOut();">Sign Out</button>
    </div>
    <script src="index.js"></script>
    <script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
    <script src="https://apis.google.com/js/platform.js" async defer></script>

  </body>
</html>

Any help and/or suggestions is greatly appreciated

0 Answers0