2

I've been scouring the documentation of the AWS iOS SDK (Swift) for 2 days for the answer to what I thought should be a simple question, so sorry if I'm completely missing something here. So here's what I'm trying to do:

I have been working on an iOS app and have decided to go the AWS backend route. I want to have facebook and developer authenticated identities. I'm now familiar with the authentication flow and have written a backend that authenticates a user and sends the identity to Cognito, takes in the Cognito identity id and open_id token and returns them as a response. My problem is in the implementation of the identity provider on the iOS side. There is very clear documentation on how to implement AWSAbstractCognitoIdentityProvider here:

http://docs.aws.amazon.com/cognito/latest/developerguide/developer-authenticated-identities.html

The problem is that protocol doesn't seem to exist anymore and my efforts lead me back to this documentation. This leads me to believe that I am missing something. Am I? Because I can't find a new alternative to AWSAbstractCognitoIdentityProvider. I have also read a couple different blog posts by AWS devs but they all seem to point to this seemingly no existent protocol.

Can someone point me in the right direction on where to find more current documentation? Or help me see what I'm missing if this is still the way its done.

PS: My facebook implementation is up and running so I also trying reverse engineering it from there but couldn't get anything concrete. Thanks in advance for your time.

  • Hi, an easy way to achieve this exact use case is through Mobile Hub. AWS Mobile Hub lets you create Facebook enabled auth for your resources and provides a sample app for same demonstrating that. You can access it here: https://console.aws.amazon.com/mobilehub/home?region=us-east-1#/ – Rohan Dubal Oct 13 '16 at 20:59
  • @RohanDubal thanks for the suggestion but I have tried that. The mobile hub leaves the implementation of developer authenticated identities up to you. Mobile hub was my original approach but it handles identities differently than regular Cognito through abstraction. I found this to be messy because I ended up mixing implementation. I figured it out but I went away from the mobile hub. I am now handling identities myself and extending `AWSCognitoCredentialsProviderHelper` for my BYOI. – Joe McGuckin Oct 15 '16 at 18:56

1 Answers1

0

Joe: There is now a full example implementation of an AWSSignInProvider in swift as part of a fork off of the aws-mobile-hub-helper repo. There is a sample app that uses it here.

There is a writeup that might be helpful to you here

Community
  • 1
  • 1
Bruce0
  • 2,718
  • 1
  • 17
  • 21