The Amplify Auth category provides an interface for authenticating a user. Behind the scenes, it provides the necessary authorization to the other Amplify categories. It comes with default, built-in support for [Amazon Cognito](https://aws.amazon.com/cognito) User Pool and Identity Pool. The Amplify CLI helps you create and configure the auth category with an authentication provider.

## Goal

To setup and configure your application with Amplify Auth and go through a simple api to check the current auth session.

## Prerequisites

import ios0 from "/src/fragments/lib-v1/auth/ios/getting_started/10_preReq.mdx";

<Fragments fragments={{ios: ios0}} />

import android1 from "/src/fragments/lib-v1/auth/android/getting_started/10_preReq.mdx";

<Fragments fragments={{android: android1}} />

import flutter2 from "/src/fragments/lib-v1/auth/flutter/getting_started/10_preReq.mdx";

<Fragments fragments={{flutter: flutter2}} />

## Install Amplify Libraries

import ios6 from "/src/fragments/lib-v1/auth/ios/getting_started/20_installLib.mdx";

<Fragments fragments={{ios: ios6}} />

import android7 from "/src/fragments/lib-v1/auth/android/getting_started/20_installLib.mdx";

<Fragments fragments={{android: android7}} />

import flutter8 from "/src/fragments/lib-v1/auth/flutter/getting_started/20_installLib.mdx";

<Fragments fragments={{flutter: flutter8}} />

## 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 ios50 from "/src/fragments/lib/auth/ios/getting_started/50_configureBackend.mdx";

<Fragments fragments={{ios: ios50}} />

import android50 from "/src/fragments/lib/auth/android/getting_started/50_configureBackend.mdx";

<Fragments fragments={{android: android50}} />

import flutter70 from "/src/fragments/lib/auth/flutter/getting_started/70_configureBackend.mdx";

<Fragments fragments={{flutter: flutter70}} />

## Initialize Amplify Auth

import ios9 from "/src/fragments/lib-v1/auth/ios/getting_started/30_initAuth.mdx";

<Fragments fragments={{ios: ios9}} />

import android10 from "/src/fragments/lib-v1/auth/android/getting_started/30_initAuth.mdx";

<Fragments fragments={{android: android10}} />

import flutter11 from "/src/fragments/lib-v1/auth/flutter/getting_started/30_initAuth.mdx";

<Fragments fragments={{flutter: flutter11}} />

import flutter12 from "/src/fragments/lib-v1/auth/flutter/getting_started/40_authenticator.mdx";

<Fragments fragments={{flutter: flutter12}} />

## Check the current auth session

You can now check the current auth session.

import ios12 from "/src/fragments/lib-v1/auth/ios/getting_started/40_fetchSession.mdx";

<Fragments fragments={{ios: ios12}} />

import android13 from "/src/fragments/lib-v1/auth/android/getting_started/40_fetchSession.mdx";

<Fragments fragments={{android: android13}} />

import flutter13 from "/src/fragments/lib-v1/auth/flutter/getting_started/50_fetchSession.mdx";

<Fragments fragments={{flutter: flutter13}} />

The `isSignedIn` property of the `authSession` will be false since you haven't signed in to the category yet.

## Next Steps
Congratulations! You've successfully setup AWS Cognito Auth plugin.  Check out the following links to see other Amplify Auth use cases:

* [Authenticate a user with username password](/lib-v1/auth/signin)
* [Authenticate a user using a web UI](/lib-v1/auth/signin_web_ui)
* [Authenticate a user with another auth provider](/lib-v1/auth/social)
