aws-amplify / amplify-swift

A declarative library for application development using cloud services.
Apache License 2.0
456 stars 198 forks source link

Deprecate AWSAuthSignInOptions.validationData #2595

Closed palpatim closed 1 year ago

palpatim commented 1 year ago

Is your feature request related to a problem? Please describe.

While reviewing auth APIs across platforms, we (re)discovered that the Cognito plugin for Swift exposes both a validationData and a metadata property on AWSAuthSignInOptions:

https://github.com/aws-amplify/amplify-swift/blob/f68530431adbc22db45a12f3efd8450a0c94e44e/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Models/Options/AWSAuthSignInOptions.swift#L14-L17

However, Cognito's InitiateAuth API only supports the ClientMetadata parameter.

We presumably added validationData for backward compatibility with V1, but the existence of this parameter on the plugin options adds further confusion to an already confusing service API. We should deprecate it in V2 and remove it vNext.

Describe the solution you'd like

We should deprecate AWSAuthSignInOptions.validationData parameter in V2 and remove it vNext.

Describe alternatives you've considered

Do nothing. However, the existence of this parameter on the plugin options adds further confusion to an already confusing service API. Cognito passes ClientMetadata and ValidationData to Lambda triggers in different ways depending on the API, and PluginOptions for this API should simply pass through the customer's value.

Is the feature request related to any of the existing Amplify categories?

Auth

Additional context

No response

github-actions[bot] commented 1 year ago

This issue was opened by a maintainer of this repository; updates will be posted here. If you are also experiencing this issue, please comment here with any relevant information so that we're aware and can prioritize accordingly.