New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Sharing authentication state between apps from the same developer #4645
Comments
Hello @wrbl606 - Thanks for opening the request. On iOS this is supported via Here is an example of how to set that value. final auth = AmplifyAuthCognito(
secureStorageFactory: AmplifySecureStorage.factoryFrom(
iOSOptions: IOSSecureStorageOptions(accessGroup: 'foo'),
),
); There is no equivalent for Android currently. We can mark this as a feature request to start tracking interest. |
Thank you! Assuming we'll implement the data sharing solution on our own for Android, is there a way to make the |
Assuming that this is currently not possible, perhaps if it comes to a new feature it would be possible to use AccountManager for Android. 🤔 |
Apologies for the delayed response. You can create your own implementation of credential storage. Please see the docs here, which show a simple example of an in memory credential store. |
@Jordan-Nelson Thanks for the reply! So if we implement it ourselves for Android, sharing credentials between many apps will be possible, or do we also have to implement this mechanism ourselves? This may be a stupid question, but it's completely new to me. This documentation mentions |
If you use Amplify's implementation, Android EncryptedSharedPreferences is used. If you build your own implementation, you need to decide where to store tokens and how to share them across applications and you need to implement that. |
@Jordan-Nelson Thanks for your reply! I'd like to ask about a related topic. Is there any special effort required on the frontend side when we want to use the same user pool across multiple mobile applications? Regarding the concept itself, I found some valuable information here: https://docs.aws.amazon.com/cognito/latest/developerguide/application-client-based-multi-tenancy.html. |
There is nothing in Amplify Flutter preventing the same user pool from being used in multiple apps. As discussed, Amplify Flutter will not share credentials across applications automatically though. |
Okay, thanks for confirming this fact! |
Description
Not a bug, rather guidance or a feature request.
On Android and iOS (though achieved in a very different manner), apps from the same developer can exchange information. Is
amplify_auth_cognito
ready for sharing user tokens in such a way, so authentication state is shared between a group of apps from the same developer? If so, what needs to be done to opt in to such behaviour, and if not will you consider implementing this feature or provide documentation on how to achieve that?Categories
Steps to Reproduce
Not a bug, but also no way to report feature requests 😇
Screenshots
No response
Platforms
Flutter Version
3.19.5
Amplify Flutter Version
1.7.0
Deployment Method
Amplify CLI
Schema
No response
The text was updated successfully, but these errors were encountered: