amplify-swift icon indicating copy to clipboard operation
amplify-swift copied to clipboard

AWS Lambda authorization in DataStore

Open rezab777 opened this issue 3 years ago • 3 comments

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

Hello It's been almost almost a year now that Lambda authorization for AWS AppSync has been released. We have implemented Lambda auth for our web app but would like to be able to use Lambda authorization for our mobile apps as well. Could you please provide an ETA of when AWS Lambda authorizer configuration will be added to amplify-ios DataStore ?

Describe the solution you'd like

Being able to use Lambda auth in amplify-ios.

Describe alternatives you've considered

Using Ionic with amplify, as Lambda auth seems to work with JS.

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

No response

Additional context

No response

rezab777 avatar Jul 15 '22 22:07 rezab777

We have support for AWS Lambda authorization in amplify-ios. Please find the related documentation here - https://docs.amplify.aws/lib/graphqlapi/authz/q/platform/ios/#aws-lambda-1

royjit avatar Jul 22 '22 21:07 royjit

@royjit Thank you for your reply. But I was specifically referring to support in DataStore. I should've been more clear when describing the issue.

rezab777 avatar Jul 23 '22 02:07 rezab777

Hi @rezab777, DataStore uses Amplify.API and determines the auth mode by checking the model schema generated by amplify codegen models. To hook it together, you'll have to configure the APIPlugin with APIAuthProviderFactory so that DataStore can use it to retrieve the token when syncing data to AppSync. Additionally, the requirement to use DataStore is that the API you provision needs to have a conflict resolution strategy enabled.

lawmicha avatar Jul 25 '22 20:07 lawmicha

Closing due to inactivity, feel free to open another issue if soemthing you are trying isn't working for you or have additional questions.

lawmicha avatar Oct 31 '22 19:10 lawmicha