aws-amplify / amplify-category-api

The AWS Amplify CLI is a toolchain for simplifying serverless web and mobile development. This plugin provides functionality for the API category, allowing for the creation and management of GraphQL and REST based backends for your amplify project.
https://docs.amplify.aws/
Apache License 2.0
87 stars 73 forks source link

Provide easier mechanism for refreshing API Keys when using amplify-tools for IOS projects #343

Open wooj2 opened 4 years ago

wooj2 commented 4 years ago

Note: If your feature-request is regarding the AWS Amplify Console service, please log it in the official AWS Amplify Console forum

Is your feature request related to a problem? Please describe. I'm always frustrated after creating an iOS app that uses:amplify-tools, DataStore, and API, 7 days after, I will get 401 unauthorized error responses from the appsync service. It seems that the default expiration for the API keys is 7 days, and there isn't an obvious way for developers who adopted amplify-tools to easily update this value.

Based on talking to people/reading docs - it seems like running amplify api update and updating the right parameters would fix this, but this is not at all obvious for people who adopted amplify-tools, because the main interface for these users is updating values in amplifyxc.config (and then hitting build in xcode).

Describe the solution you'd like If running amplify api update and updating the expiration time works, this seems sufficient, but perhaps some proper documentation around this would be helpful. Perhaps some documentation of what amplify-tools is doing under the hood, so developers don't feel there is too much magic happening behind the scenes what a build does in xcode.

Describe alternatives you've considered I am open to suggestions and alternatives.

Additional context Add any other context or screenshots about the feature request here.

undefobj commented 4 years ago

@nikhname lets chat through this with @kaustavghosh06