Aws-sdk-ios: AWSMobileClient custom auth challenge ?

Created on 29 Jan 2019  路  10Comments  路  Source: aws-amplify/aws-sdk-ios

State your question
Is it possible to use custom auth challenge with AWSMobileClient for signin and signup functions ?

Which AWS Services are you utilizing?
Cognito, S3

Provide code snippets (if applicable)

Environment(please complete the following information):

  • SDK Version: 2.8.4
  • Dependency Manager: Cocoapods
  • Swift Version : 4.2
feature request mobile client

Most helpful comment

Hi @rohandubal

Is this possible following this guide? https://aws-amplify.github.io/docs/ios/authentication#customizing-authentication-flow

All 10 comments

Hi @ryancrunchi , AWSMobileClient does not support custom custom authentication challenge up to now.

Hello @ryancrunchi

Are you explicitly looking to use the customAuth feature in AWSMobileClient?

We currently also have the AWSCognitoIdentityProvider SDK which supports this customAuth flow. I can help you use the AWSCognitoIdentityProvider SDK if you are currently blocked on it.

Referring to RFC for visibility #1158

Thanks,
Rohan

Hello, thanks for your support.

I already have implemented custom auth with AWSCognitoIdentityProvider. But I find the new AWSMobileClient much easier to use.
I found interactive auth is too much interferring on how we built our view controllers flows, and AWSMobileClient would get rid of this. But I require custom auth, so I will leave my implementation as is waiting for more features on AWSMobileClient.
Thank you.

Thanks for the clarification @ryancrunchi

I have already referred this with our RFC to determine the next set of features that we are working on(#1158). I would also appreciate if you could post a response in the RFC to help us understand customer needs and plan our features better here: #1158

Thanks,
Rohan

Hi @rohandubal and @ryancrunchi,

I too am interested in such functionality. I agree with Ryan in that the AWSMobileClient is much easier to use and that it would be nice if the API client had a way of initializing a Custom Auth flow and allow us to work with the cognito lambda triggers nicely. Is there any plan for something like this in the future? I'd be happy to help with any PR's needed

Would very much be for this feature too

Hi @rohandubal

Is this possible following this guide? https://aws-amplify.github.io/docs/ios/authentication#customizing-authentication-flow

Hi @mato2593
Custom auth is currently supported in AWSMobileClient as documented above. Sorry for not updating this issue when we released it.

@royjit if I want to use AWSMobileClient for custom auth, I had to put "authenticationFlowType": "CUSTOM_AUTH" in the awsconfiguration.json file. However, doing this messes up the normal (non custom) authentication with username and password. Do you know how can we support both?

to whom it may concern. you can use

let pool = AWSCognitoIdentityUserPool.default()
pool.isCustomAuth = true

to set custom auth programatically

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pawlowskialex picture pawlowskialex  路  4Comments

dougboberg picture dougboberg  路  5Comments

motivus picture motivus  路  4Comments

aymericio picture aymericio  路  5Comments

kshrikant picture kshrikant  路  4Comments