## Authentication with Amplify

Amplify uses [Amazon Cognito](https://aws.amazon.com/cognito/) as the main authentication provider. Amazon Cognito is a robust user directory service that handles user registration, authentication, account recovery & other operations. In this tutorial, you'll learn how to add authentication to your application using Amazon Cognito and username/password login.

## Install Amplify Libraries

import js0 from '/src/fragments/lib/auth/js/getting-started-steps-basic-auth.mdx';

<Fragments fragments={{ js: js0 }} />

import reactnative0 from '/src/fragments/lib/auth/js/getting-started-steps-basic-auth-react-native.mdx';

<Fragments fragments={{ 'react-native': reactnative0 }} />

## Set Up Backend Resources

The most common way to use Authentication with Amplify is via the Amplify CLI, which allows you to create new Amazon Cognito resources or import existing ones. However, you can also use the Amplify Studio console to configure authentication or use the `Amplify.configure()` method to set up authentication with existing resources.

import js10 from '/src/fragments/lib/auth/js/getting_started/10_setUpBackendResources.mdx';

<Fragments fragments={{ js: js10 }} />

import reactnative10 from '/src/fragments/lib/auth/js/getting-started-set-up-backend-resources-react-native.mdx';

<Fragments fragments={{ 'react-native': reactnative10 }} />

## Enable sign-up, sign-in, and sign-out

import js2 from '/src/fragments/lib/auth/js/enable_sign_in_sign_up.mdx';

<Fragments fragments={{ js: js2 }} />

Follow the instructions in the [Sign in, Sign up and Sign out](/lib/auth/emailpassword) to learn about how to integrate these authentication flows in your application with the Auth APIs.

## Summary

To implement authentication flows using Amplify you can either use the Amplify UI libraries or call authentication methods directly on the `Auth` class.

`Auth` has over 30 methods including [`signUp`](/lib/auth/emailpassword#sign-up), [`signIn`](/lib/auth/emailpassword#sign-in), [`forgotPassword`](/lib/auth/manageusers#forgot-password), and [`signOut`](/lib/auth/emailpassword#sign-out) that allow you full control over all aspects of the user authentication flow.

Check out the complete API [here](https://aws-amplify.github.io/amplify-js/api/classes/authclass.html).
