I have a Flutter application in which I have Apple social login. I want to receive user Name and Surname from Apple. I have a pre-signup lambda function where I link accounts:
export const handler = async (event, _, callback) => { console.log(event); ... }
The above code prints the following (event):
I couldn't figure out how to get this data.
INFO { version: '1', region: 'eu-central-1', userPoolId: 'eu-central-1_XXXXXXXXXXXX', userName: 'signinwithapple_XXXXXXXXXXXXXXXXXXXXX.XXXXXX', callerContext: { awsSdkVersion: 'aws-sdk-unknown-unknown', clientId: 'XXXXXXXXXXXXXXXXXX' }, triggerSource: 'PreSignUp_ExternalProvider', request: { userAttributes: { email_verified: 'false', 'cognito:email_alias': '', 'cognito:phone_number_alias': '', email: 'my_mail@hotmail.com' }, validationData: {} }, response: { autoConfirmUser: false, autoVerifyEmail: false, autoVerifyPhone: false } }
In Flutter I am calling, signInWithWebUI which doesn't have parameters to handle this situation:
final result = await Amplify.Auth.signInWithWebUI(provider: AuthProvider.apple);
Can any one help with this problem? The Appstore won't accept my application because I am asking users to fill this data right after sign-up is successful.
Thanks.