I cannot find any documentation on the class AWSSignInProvider
and how to use it. There is a header:
#import <UIKit/UIKit.h>
@protocol AWSSignInProvider <NSObject>
@property (readonly, getter=isLoggedIn) BOOL loggedIn;
@property (readonly) NSURL *imageURL;
@property (readonly) NSString *userName;
- (void)login;
- (void)logout;
- (void)reloadSession;
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions;
- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication
annotation:(id)annotation;
@end
And I can see this being used in AWSIdentityManager
classes but I don't understand it at all and am trying to figure out if to use this
in order to complete the "Developer Authenticated Identity" flow in
AWS MobileHub.
Zigglzworth,
The Mobile Hub generated iOS Sample App does not have a fully documented solution yet. When creating the project in the Mobile Hub console and enabling “Custom” sign in, Mobile Hub is simply creating a “Developer provider name” associated with the default Cognito Identity Pool created for that project. Until Mobile Hub has a fully working client solution, here’s what is available to you.
Amazon Cognito posted an end-to-end example solution for integrating Cognito using developer authenticated identities here. The blog includes building the Authentication Server AND implementing the custom identity provider in iOS and Android. They also provided an iOS and Android sample app that have added functionality to interact with this sample backend solution. In the blog, you’ll see a description of the iOS classes and code changes needed to make the request to get the token from your custom provider and how to pass that back to Cognito to obtain an authenticated Identity Id.
Read through the blog and implement the backend provider as described or confirm that you have your backend already setup and then take a look at the sample client code provided and reference the code changes mentioned in the blog. Once you have a better understanding of the flow and client code changes required, you can then update your existing Mobile Hub iOS project code to match the sample code changes discussed in the blog. If you have issues or additional questions regarding Developer Authenticated Identity, please feel free to utilize the Cognito AWS forums here.