AWS ExpiredTokenException after app relaunch

后端 未结 2 1294
暗喜
暗喜 2021-01-21 15:39

I\'m building an iOS (Swift) app using AWS as the backend with Developer Authenticated Identities. Everything works fine until I close the app, leave it for a while and then rel

2条回答
  •  暖寄归人
    2021-01-21 16:29

    Unfortunately developers refreshing the token is the only way.

    I agree that it would be simpler for app developers if AWS SDK handled this but the way CrdentialsProvider is designed is supposed to be generic for all providers. For example, if someone wants to use Facebook as provider then AWS SDK will not be able to handle the refresh on its own and developer will have t handle that in his app. Keeping the refresh flow out of the SDK gives us the capability to keep the CredentialsProvider generic.

提交回复
热议问题