Signup with google-oauth2 while passing user_metadata variables

I am using auth0.js web library

I have implemented passing promo codes through user_metadata for sign up with email without any issue.

However I cannot figure out how to implement it for connection: 'google-oauth2'

Here is my webAuth athorize block:

webAuth.authorize({
  connection: 'google-oauth2',
  user_metadata: {
    promo_code: promoCode
  },
  redirectUri: redirectUri,
},

However I cannot seem to get it to work using google-oauth2
If I try and use webAuth.signup instead of webAuth.authorize it says I need to pass an email and password.

When I use this code, the user is able to sign up no problem however the user_metadata is not storing the promo code the user signed up with therefore being charged full price.

I actually just went through this, I’m using the auth0.js library for a custom signup form where users can signup with email/pass or through social.

Basically once a user signs up you need to grab their token, and then hit the management api where you can do whatever you want to the users profile.

Most of this I got from the piecing together info from this page:

Here is how I got metadata added to a social users login:

function google(){
    webAuth.popup.authorize({
        redirectUri: 'https://example.com',
        connection: 'google-oauth2',
        audience: "https://example.com/api/v2/",
        scope: 'openid profile email read:current_user update:current_user_metadata'
    }, function(err, authResult) {
        let token = authResult.accessToken;
        webAuth.parseHash({ hash: window.location.hash }, function(err, authResult) {
            if (err) {
                return console.log(err);
            }
            webAuth.client.userInfo(token, function(err, user) {
                // Now you have the user's information
                console.log(user);
                console.log(err);
                var auth0Manage = new auth0.Management({
                        domain: 'example.auth0.com',
                        token: token
                    });
               let metaData = {promo: '1234', date: date};
                auth0Manage.patchUserMetadata(user.sub, metaData, function(err, user) {
                    console.log('finished');
                    console.log(user);
                    console.log(err);
                });
            });
        });
    });
}