amplify-swift: CUSTOM_AUTH not working on v2.2.0 (working on 1.28.3)

Describe the bug

Confirming SMS code is not working when using CUSTOM_AUTH as authenticationFlowType.

Not working on 2.2.0 - working on 1.28.3 (it would be nice to have 2.0.0 because of async await)

Steps To Reproduce

This is our use case:

  1. Call signup (in case of success go to signIn, or in case user exists go to signIn) - Working āœ…

try await Amplify.Auth.signUp(username: username, password: password, options: options)
  1. Call signIn - Working āœ…
try await Amplify.Auth.signIn(username: username, password: password)
  1. After that I get SMS code which I want to confirm with - not Working šŸ”“ (just calls the function and get stucked forever)
try await Amplify.Auth.confirmSignIn(challengeResponse: smsCode)

Our awsConfig:

{
    "auth":
    {
        "plugins":
        {
            "awsCognitoAuthPlugin":
            {
                "CognitoUserPool":
                {
                    "Default":
                    {
                        "PoolId": "our-pool",
                        "AppClientId": "our-appclientId",
                        "AppClientSecret": "our-appSecret",
                        "Region": "our-region"
                    }
                },
                "Auth":
                {
                    "Default":
                    {
                        "authenticationFlowType": "CUSTOM_AUTH"
                    }
                }
            }
        }
    }
}


### Expected behavior

It works - returns succes or error

### Amplify Framework Version

2.2.0

### Amplify Categories

Auth

### Dependency manager

Swift PM

### Swift version

5.7

### CLI version

-

### Xcode version

14.1

### Relevant log output

```shell
<details>
<summary>Log Messages</summary>


INSERT LOG MESSAGES HERE
```

Is this a regression?

No

Regression additional context

No response

Device

iPhone 14- Simulator

iOS Version

iOS 16.1

Specific to simulators

No response

Additional context

I’m working on KMM project where I have interface/protocol inside shared module and implementations on iOS and Android side. I have to say this error exists in Android 2.x.x version as well (just slightly different) - will post issue there as well.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 29 (14 by maintainers)

Most upvoted comments

@gurkarangulati Can you please open a new issue so that we can track and work on the issue.