Amazon Cognito lets you add user sign-up, sign-in, and access control to your web and mobile apps quickly and easily. Amazon Cognito scales to millions of users and supports sign-in with social identity providers, such as Apple, Facebook, Google, and Amazon, and enterprise identity providers via SAML 2.0 and OpenID Connect.
To start, I want to clarify that “Amplify” is an umbrella term for multiple things. We have:
AWS, Azure, or Google Cloud Platform are completely responsible for developing a piece of code by dynamically designating the resources. And the platform only charges for the number of resources used to run the code. The code sent to the cloud provider for execution is in the form of functions. Sometimes called “Functions as a Service ” or “FaaS”. We use AWS Lambda (Links to an external site.) to communicate with AWS cloud services.Register a user (Links to an external site.) The default CLI flow as mentioned in the getting started guide (Links to an external site.) requires a username, password and a valid email id as parameters to register a user. Invoke the following api to initiate a sign up flow.
AuthSignUpOptions options = AuthSignUpOptions.builder()
.userAttribute(AuthUserAttributeKey.email(), "my@email.com")
.build();
Amplify.Auth.signUp("username", "Password123", options,
result -> Log.i("AuthQuickStart", "Result: " + result.toString()),
error -> Log.e("AuthQuickStart", "Sign up failed", error)
);
The next step in the sign up flow is to confirm the user. A confirmation code will be sent to the email id provided during sign up. Enter the confirmation code received via email in the confirmSignUp call.
Amplify.Auth.confirmSignUp( “username”, “the code you received via email”, result -> Log.i(“AuthQuickstart”, result.isSignUpComplete() ? “Confirm signUp succeeded” : “Confirm sign up not complete”), error -> Log.e(“AuthQuickstart”, error.toString()) );
docs.amplify.awsdocs.amplify.aws Amplify Framework Docs Amplify Framework documentation - Learn how to use Amplify to develop and deploy cloud-powered mobile and web apps. Amazon Web Services, Inc.Amazon Web Services, Inc. AWS Lambda – Serverless Compute - Amazon Web Services AWS Lambda lets you run code without provisioning or managing servers. You pay only for the compute time you consume.