[GSI_LOGGER]: The given login_uri is not allowed for the given client ID

42 Views Asked by At

I want to Sign In with Google for Web, and I use HTML api with data-login_uri, here the code:

<div id="g_id_onload"
     data-client_id="xxx.apps.googleusercontent.com"
     data-context="signin"
     data-ux_mode="redirect"
     data-login_uri="http://localhost:8080/google/callback"
     data-itp_support="true">
</div>

and I have added data-login_uri to the Authorized redirect URIs in the Google APIs console.

enter image description here

When I click the google login button, the redirect page is white, and the console logs [GSI_LOGGER]: The given login_uri is not allowed for the given client ID.. Can someone have solutions?

I have seen docs https://developers.google.com/identity/gsi/web/guides/integrate#sign_in_with_google_button_considerations.

0

There are 0 best solutions below