aws-sdk-android icon indicating copy to clipboard operation
aws-sdk-android copied to clipboard

Save Cognito credentials inside AccountManager instead of SharedPrefs

Open JurajBegovac opened this issue 4 years ago • 1 comments

Can we somehow change AWSMobileClientStore to not use sharedPrefs then to store tokens inside AccountManager because that's the correct place to store tokens (e.g. if we want to have multiple apps that share same account that would be the right place to store it - e.g. google maps, gmail and drive use same account from account manager).

Also, when user clicks "Clear data" in Android Settings of the app then user will clear sharedPrefs as well. So user will clear tokens as well. But if tokens were saved inside Account Manager user cannot remove them with "Clear data" - in that case the only way to remove them is with removing account (which is also correct :) )

Thanks and kind regards

JurajBegovac avatar Feb 09 '21 05:02 JurajBegovac

Sharing credentials across apps via AccountManager is not currently supported, though I do agree it would be valuable for anyone building multiple apps that share a common user pool.

We will leave this open as a feature request, and will prioritize based on reactions/comments from others.

richardmcclellan avatar Feb 09 '21 15:02 richardmcclellan