I'm implementing Google SSO using amplify cognito. Its working fine, but if the google doesnt contains family name it throws a custom state error. Configuration are done on cognito panel to make family name as required attribute, as the cognito sign in requires family name to be mandatory. I dont the google signin to have mandatory family name, neither can I change the settings in the cognito panel.
Is there any way to handle this is the code itself? this is my code to call the cognito google signing
Auth.federatedSignIn({ provider: CognitoHostedUIIdentityProvider.Google,});
and these are the configurations
oauth: {
domain: Config.REACT_NATIVE_APP_AMPLIFY_OAUTH_DOMAIN,
scope: ["openid", "email", "profile"],
redirectSignIn: Config.REACT_NATIVE_APP_AMPLIFY_OAUTH_REDIRECT_SIGN_IN,
redirectSignOut: Config.REACT_NATIVE_APP_AMPLIFY_OAUTH_REDIRECT_SIGN_OUT,
responseType: "code",
},