View on GitHub

reading-notes

Amplify and Cognito

What is Amplify Auth category?

It is away of providing an interface for authenticating a user.

Get Start:

First thing we need to start provisioning auth resources in the backend, we can use amplify add auth command. And then enter the following:

? Do you want to use the default authentication and security configuration?
    `Default configuration`
? How do you want users to be able to sign in?
    `Username`
? Do you want to configure advanced settings?
    `No, I am done.`

To push the changes to the cloud use amplify push command.

How To Install Amplify Libraries?

put the following dependency in the app‘s build.gradle file:

dependencies {
    implementation 'com.amplifyframework:aws-auth-cognito:1.17.4'
}

After the installing we need to Initialize Amplify Auth for that we can add =>

// Add this line, to include the Auth plugin.
Amplify.addPlugin(new AWSCognitoAuthPlugin());
Amplify.configure(getApplicationContext());

and then call Amplify.configure