AWSCognitoUserPoolsSignInProvider Class Reference

Inherits from NSObject
Conforms to AWSSignInProvider
Declared in AWSCognitoUserPoolsSignInProvider.h
AWSCognitoUserPoolsSignInProvider.m

Overview

AWSCognitoUserPoolsSignInProvider adopts the AWSSignInProvider protocol.

It works with the AWS Cognito User Pools SDK internally.

Other Methods

+ setupUserPoolWithId:cognitoIdentityUserPoolAppClientId:cognitoIdentityUserPoolAppClientSecret:region:

Registers the cognito pool with specified configuration. The pool object can be accessed by using the CognitoIdentityUserPoolForKey: method using AWSCognitoUserPoolsSignInProviderKey as the identifier key.

+ (void)setupUserPoolWithId:(NSString *)cognitoIdentityUserPoolId cognitoIdentityUserPoolAppClientId:(NSString *)cognitoIdentityUserPoolAppClientId cognitoIdentityUserPoolAppClientSecret:(NSString *)cognitoIdentityUserPoolAppClientSecret region:(AWSRegionType)region

Parameters

cognitoIdentityUserPoolId

The Cognito Identity User Pool Id

cognitoIdentityUserPoolAppClientId

The Cognito Identity User Pool Client Id

cognitoIdentityUserPoolAppClientSecret

The Cognito Identity User Pool Client Secret

region

The Cognito Identity User Pool Service Region

Declared In

AWSCognitoUserPoolsSignInProvider.h

+ sharedInstance

Fetches the shared instance for AWSCognitoUserPoolsSignInProvider. The method setupUserPoolWithId:cognitoIdentityUserPoolAppClientId:cognitoIdentityUserPoolAppClientSecret:region has to be called once before accessing the shared instance.

+ (instancetype)sharedInstance

Return Value

the single instance of AWSCognitoUserPoolsSignInProvider

Declared In

AWSCognitoUserPoolsSignInProvider.h

– setInteractiveAuthDelegate:

Set the instance of the class adopting the AWSCognitoIdentityInteractiveAuthenticationDelegate protocol of Cognito Idp SDK.

- (void)setInteractiveAuthDelegate:(id)interactiveAuthDelegate

Parameters

interactiveAuthDelegate

A class adopting the AWSCognitoIdentityInteractiveAuthenticationDelegate protocol

Declared In

AWSCognitoUserPoolsSignInProvider.h

– isLoggedIn

Returns the status of the current user pool user.

- (BOOL)isLoggedIn

Return Value

YES if the user is signed in.

Declared In

AWSCognitoUserPoolsSignInProvider.h

– getUserPool

Returns the configured underlying user pool client.

- (AWSCognitoIdentityUserPool *)getUserPool

Return Value

the configured user pool instance

Declared In

AWSCognitoUserPoolsSignInProvider.h

Other Methods

– reloadSession

The handler method for managing the session reload for the Sign-In Provider. The completionHandler will bubble back errors to the developers.

- (void)reloadSession

Declared In

AWSSignInProvider.h

– login:

The login handler method for the Sign-In Provider. The completionHandler will bubble back errors to the developers.

- (void)login:(AWSSignInManagerCompletionBlock)completionHandler

Declared In

AWSSignInProvider.h

– logout

The logout handler method for the Sign-In Provider.

- (void)logout

Declared In

AWSSignInProvider.h