aws-amplify / aws-amplify/amplify-android

Developers would like to reconfigure Amplify at runtime

Open
#560 10 comments 17 reactions 0 assignees View on GitHub
core feature-request
Dominant language
Java
Stars
287
Forks
132
Avg merge
2d 2h
Merged PRs (30d)
45

Description

A customer is developing an app using TWO Cognito User Pools.
Customer develops a web app, an Android app and an iOS App.

On their web app, they are able to call `Amplify.configure(configuration);` with one config (Cognito User Pool) or the other, depending on the URL of the app being used.

But on Mobile, it seems that once configured, they can not switch to another configuration by calling `Amplify.configure(configuration);` a second time.

There is a global configuration lock defined here https://github.com/aws-amplify/amplify-android/blob/master/core/src/main/java/com/amplifyframework/core/Amplify.java#L74

and used here https://github.com/aws-amplify/amplify-android/blob/fdb36b4cda6e513a0f4bf90e30bf1798438f1eaa/core/src/main/java/com/amplifyframework/core/Amplify.java#L125

I also raised an issue against `amplify-ios` : https://github.com/aws-amplify/amplify-ios/issues/527

Contributor guide

Open the contributing guide

Research direction

Start with the global configuration lock in core/src/main/java/com/amplifyframework/core/Amplify.java, including the configure call site linked in the issue. Trace how a second Amplify.configure(configuration) call is handled on Android and compare the reported web behavior. Done means the supported runtime configuration behavior for switching between Cognito User Pools is defined and verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, aws, java
Domain
authentication, mobile
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.