AWS Cognito - Retrieve user data after logging in using SignInUI

I followed the instructions in Add AWS Mobile User Login

The code is as follows:

public class LoginActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_login);

        AWSMobileClient.getInstance().initialize(this, new AWSStartupHandler() {
            @Override
            public void onComplete(AWSStartupResult awsStartupResult) {
                SignInUI signIn = (SignInUI) AWSMobileClient.getInstance().getClient(LoginActivity.this, SignInUI.class);
                signIn.login(LoginActivity.this, MainActivity.class).execute(); 
            }
        }).execute();
    }
}

My question is how to get public complaints for a registered user (e.g. email address, name, etc.) so that I can know who is logged in? The only ways I've seen is to do it manually, which seems to require the secrecy of the client, which I obviously don't have, as this is a client-side mobile application.

+4
source share
1 answer

From the AWS Cognito documentation, I found this:

Step 7 AWS Cognito Tutorial to Integrate User Pools for Android Applications

: : Android

0

Source: https://habr.com/ru/post/1693831/


All Articles