1 Answer
- Newest
- Most votes
- Most comments
0
you can send custom parameters from the client to the PreSignUp_ExternalProvider Lambda trigger in a social login signup flow.
In your client code, when calling the showSignIn method, you can add a custom parameter to the signInURIQueryParameters dictionary
let signInQueryParam = ["myCustomData": "customValue"]
let hostedUIOptions = HostedUIOptions(identityProvider: kLoginWith_Google, signInURIQueryParameters: signInQueryParam)
AWSMobileClient.default().showSignIn(navigationController: vc.navigationController!, hostedUIOptions: hostedUIOptions) { (userState, error) in
// Handle the sign in result
}
In the PreSignUp_ExternalProvider Lambda function, you can access the custom parameter in the validationData object of the event.request object
exports.handler = async (event, context) => {
// Get the custom parameter from the validationData object
const customParam = event.request.validationData['myCustomData'];
// Do something with the custom parameter
// Return the event object
return event;
};

@sdtslmn I have tried this approach and my problem statement mentioned exactly the approach suggested by you. Still could not receive the value. I am using 2.22.0 version of ios SDK