Custom Social Login button

Trying to get the social google login button working on a custom page. Based on the idea of the code written here https://www.wix.com/corvid/forum/community-discussion/solution-google-facebook-user-information-on-login

I am getting through the process in the iframe but not getting the message from the iframe to the client side code to create the user. Any inputs?

 // For full API documentation, including code examples, visit https://wix.to/94BuAAs

import wixUsers from 'wix-users';

$w.onReady(function () {
 
});

//javascript page code for html iframe interaction

 // when a message is received from the HTML Component

$w("#html1").onMessage((results) => {

let googleAccoutInfo = results.data;

console.log(googleAccoutInfo);
 //string values for each item

 let gUserId = results.data.userId;
 let firstName = results.data.firstName;
 let lastName = results.data.lastName;
 let fullName = results.data.fullName;
 let email = results.data.userEmail;
 let password = results.data.idToken;

 console.log(gUserId);
 console.log(firstName);
 console.log(lastName);
 console.log(fullName);
 console.log(email);
 console.log(password);

wixUsers.register(email, password)
  .then( (result) => {
 let status = result.status; // "Active"
 let user = result.user;
    console.log("user created");
  } );

});

Iframe code below:

<!doctype html>
<html>
<head>
  <meta name="google-signin-client_id" content="XXXXXXXXXXXXXXXXXXXXXXXXXXXXX.apps.googleusercontent.com">
<script>
</script>
</head>
<body>
  <div id="my-signin2"></div>
  <script>
function onSuccess(googleUser) {
var profile = googleUser.getBasicProfile();
let userId = profile.getId();
let fullName = profile.getName();
let firstName = profile.getGivenName();
let lastName = profile.getFamilyName();
let userEmail = profile.getEmail();
let idToken = googleUser.getAuthResponse().id_token;
window.parent.postMessage({userId: (userId), idToken: (idToken),fullName: (fullName), firstName: (firstName), lastName: (lastName),userEmail: (userEmail)}, "*");
   }//end of googleSignIn

function onFailure(error) {
console.log(error);
}

//custom google button
 function renderButton() {
gapi.signin2.render('my-signin2', {
'scope': 'profile email',
'width': 240,
'height': 50,
'longtitle': true,
'theme': 'dark',
'onsuccess': onSuccess,
'onfailure': onFailure
});
}
  </script>

  <script src="https://apis.google.com/js/platform.js?onload=renderButton" async defer></script>
</body>
</html>

Dif you sign up with Googlee and got your API keys?

Yup. Ive got them.

I am getting to the stage where I can click on the google sign in pop-up that comes with the options to choose a gmail id.

Once I choose it, the data from the iframe does not seem to be doing anything. Nothing happens.

I would be tempted to keep the google signout part of the html so that it only applies to Wix and not on their own browser as well.

Anyways, have you set up your authorised domains/authorised javascript origins field?
https://support.google.com/cloud/answer/6158849?hl=en
Authorized domains
To protect you and your users, Google restricts your OAuth 2.0 application to using Authorized Domains. If you have verified the domain with Google, you can use any Top Private Domain as an Authorized Domain.

After you add an Authorized Domain, you can use any of its subdomains or pages, and any other associated country codes.

Add your Authorized Domains before you add your redirect or origin URIs, your homepage URL, your terms of service URL, or your privacy policy URL.

https://developers.google.com/identity/sign-in/web/server-side-flow
In the Authorized JavaScript origins field, enter the origin for your app. You can enter multiple origins to allow for your app to run on different protocols, domains, or subdomains. You cannot use wildcards. In the example below, the second URL could be a production URL.

http://localhost:8080
https://myproductionurl.example.com 

Also, as noted on the original forum post too, that you will also need to add filesusr as well as your own domain.

I am running through the same problem. Was this issue fixed?