aws-amplify / amplify-swift

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

[Feature Request] AuthType Parameter for APIPlugin API calls #3133

Open lawmicha opened 1 year ago

lawmicha commented 1 year ago

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

Native platforms currently generate the amplifyconfiguration with the API section containing only the primary auth mode of an AppSync backend. With multi-auth modes configured on the backend, there's not an easy way to switch between auth modes from the library calls.

See https://github.com/aws-amplify/amplify-swift/issues/3089#issuecomment-1642370311 and https://github.com/aws-amplify/amplify-swift/issues/564#issuecomment-655077312

Describe the solution you'd like

Ability to pass authType into the Amplify.API request.

Describe alternatives you've considered

Modifying the amplifyconfiguration.json gets reverted on amplify pull so it would have to be amplify to modify the configuration by generating multiple sections. The problem with this is that multiple sections will then require the developer to be aware of the api friendly name (key of the section) to make the request with the right configuration.

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

API

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.

github-actions[bot] commented 1 year ago

This has been identified as a feature request. If this feature is important to you, we strongly encourage you to give a 👍 reaction on the request. This helps us prioritize new features most important to you. Thank you!