Giter Club home page Giter Club logo

amplify-ui-swift-authenticator's Issues

Inputs get reset when @Published value is updated if AuthenticatorTheme is used

Every time the value of a @​Published property is updated, all the inputs get reset. (see video)
When removing the AuthenticatorTheme there is no problem.
Example code is attached.

RPReplay_Final1704317953.mp4
import SwiftUI
import Authenticator
import Amplify
import AWSCognitoAuthPlugin
import CoreLocation

class LocationDelegate: ObservableObject{
    @Published var location: CLLocationCoordinate2D = CLLocationCoordinate2D(latitude: 10.0, longitude: 10.0)
    
    init() {
        Timer.scheduledTimer(withTimeInterval: 1, repeats: true) { timer in
            self.location = CLLocationCoordinate2D(latitude: self.location.latitude + 0.01,
                                                   longitude: self.location.longitude)
        }
    }
}

@main
struct AuthTestApp: App {
    @StateObject private var locationManager = LocationDelegate()

    init() {
         do {
             try Amplify.add(plugin: AWSCognitoAuthPlugin())
             try Amplify.configure()
         } catch {
             print("Unable to configure Amplify \(error)")
         }
     }

    var body: some Scene {
        WindowGroup {
            ContentView()
                .environmentObject(locationManager)
        }
    }
}

struct ContentView: View {
    @EnvironmentObject private var locationManager: LocationDelegate

    var body: some View {
        TabView {
            AuthViewTheme()
                    .tabItem{
                        Image(systemName: "person.3")
                        Text("not ok (with theme)")
                    }.clipped()
            AuthViewNoTheme()
                    .tabItem{
                        Image(systemName: "person.3")
                        Text("ok (no theme)")
                    }.clipped()
        }
    }
}

struct AuthViewNoTheme: View {
    var body: some View {
        Authenticator { state in
        }
    }
}

struct AuthViewTheme: View {
    private let theme = AuthenticatorTheme()
    
    var body: some View {
        Authenticator { state in
        }
        .authenticatorTheme(theme)
    }
}

Example: Adding Documentation for Fully Custom 'SignUp' and 'Confirmation Code' Pages

Screenshot 2023-08-28 at 10 38 38 PM

Similar to the template above, I think it would be helpful to provide documentation for how to create and manage fields within a fully custom SignUp and Confirmation Code Page.

Ex.

  • If I wanted to create a Custom SignUp page that contains fields such as 'Username', 'Password', and 'ConfirmPassword', how would those fields be accessible from the state.
  • In addition, for a page such as the Confirmation Code page (the page after an email is sent with the code), how could you access the proper field?
  • Finally, if I wanted to switch to my Custom SignUpPage, the documentation for how to connect them together. I think that I am supposed to use state.move(to: <#T##AuthenticatorInitialStep#>) however it is unclear. With the example below, it is unclear how I would be able to move from one of my custom views into the other while still using Authenticator.
            Authenticator(
                signInContent: { state in
                    NewSignIn(state: state)
                }, signUpContent: { state in
                    NewSignUp(state: state)
                }
            ) { _ in

Thank you in advance!

Toolbar Theme

I'd like to change the color of the toolbar so that it matches the header - I tried obvious stuff like...

                Authenticator(headerContent:{
                    ZStack{
                        Color.indigo
                        HStack{
                            Text("MyApp")
                                .foregroundColor(.white)
                        }
                        .padding()
                        
                    }
                    .frame(height: 100)
                }
                )
                {state in
                    Dashboard()
                }
                .authenticatorTheme(theme)
                .toolbarBackground(.indigo, for: .navigationBar)
                .toolbarBackground(.visible, for: .navigationBar)

Didn't seem to work, any ideas?

Delivery details destination is nil in custom sign up confirm view

Background:

  • Using Authenticator's state machine with own custom views

Steps to reproduce this issue:

  1. Sign up with custom view. User is redirected to sign up confirmation view -> delivery details destination is available. I can get the destination value and set it in to my text.
  2. Kill the app
  3. Launch the app again
  4. Do the login -> User is redirected in to custom sign up confirmation view

I want to show text like "Activation code is sent to %@" in custom sign up confirmation view but destination is nil.

Birthdate Attribute Mismatch between Cognito Settings and Authenticator UI

Description:
When using the Amplify UI Authenticator for SwiftUI, I've encountered an inconsistency between the Cognito user pool settings and the authenticator UI. Specifically, the birthdate attribute is set as required in my Cognito user pool settings. However, in the user interface of the authenticator, the birthdate field is presented as optional.

Steps to Reproduce:

Set the birthdate attribute as required in Cognito user pool settings.
Implement the Amplify UI Authenticator in a SwiftUI application.
Attempt to sign up without filling in the birthdate.
Actual Behavior:
The user is able to successfully create an account in the Cognito user pool without providing a birthdate.

Expected Behavior:
The birthdate should be required in the authenticator UI to match the Cognito user pool settings. If a user tries to sign up without providing a birthdate, they should receive an error and the account should not be created.

Screenshot 2023-08-24 at 9 57 01 AM

Screenshot 2023-08-24 at 9 58 45 AM

Title: Birthdate Attribute Error: String Must Be No Longer Than 10

Before creating a new issue, please confirm:

On which framework/platform are you having an issue?

iOS

Which UI component?

Authenticator

How is your app built?

IOS swift SwiftUI

What browsers are you seeing the problem on?

iOS (React Native)

Which region are you seeing the problem in?

East-1

Please describe your bug.

When entering a birthdate in the "YYYY-MM-DD" format, an error message is displayed: "Attributes did not conform to the schema: birthdate: String must be no longer than 10 characters." It seems that the birthdate validation expects exactly 10 characters, causing issues with certain date formats.

What's the expected behaviour?

The expected behavior is for the birthdate in the "YYYY-MM-DD" format to be accepted without errors.

Help us reproduce the bug!

using the amplify authenticator package with IOS swift swiftui and this error is being thrown when submitting birth date to cognito as an attribute for user creation

Code Snippet

// Put your code below this line.

Console log output

xcode Console log output:
"AuthError: Attributes did not conform to the schema: birthdate: String must be no longer than 10 characters"

Additional information and screenshots

No response

Error on Sign Up

Hi I just set up a project exactly as described here...

https://ui.docs.amplify.aws/swift/connected-components/authenticator

When I try to register a new user via the simulator I get this error...

2023-05-10 17:42:39.239082+0100 MobileApp[27776:408368] [SignUpState] Unable to Sign Up
2023-05-10 17:42:39.239325+0100 MobileApp[27776:408368] [SignUpState] The operation couldn’t be completed. (Amplify.AuthError error 3.)
2023-05-10 17:42:39.239549+0100 MobileApp[27776:408368] [AuthenticatorError] The operation couldn’t be completed. (Amplify.AuthError error 3.)
2023-05-10 17:42:39.239683+0100 MobileApp[27776:408368] [AuthenticatorError] Unknown error happened

I'm not sure how to begin de-bugging it

If I create a user via the Cognito console I can go through the force-change password steps and sign in with no problems

phonenumber field validation/error not shown correctly

Which Creating an account, in phonenumber field you can paste iphone keyboard suggested phone number in (408) 555-1212 format, which now can be submitted. But when error comes back from backend you can see ios log saying it is a phone number format error but on the screen you see a generic error that something went wrong.

Can we fix this to show the proper that phone number is in wrong format.

Thanks
Manish

Amplify and Authenticator

How did you install the Amplify CLI?

curl

If applicable, what version of Node.js are you using?

No response

Amplify CLI Version

12.4.0

What operating system are you using?

Mac

Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.

No

Describe the bug

I am using the Authenticator class with Cognito for my app. Also using a custom login screen. All works well except for the timeout. I have a timeout setting up in AWS Cognito for 60 minutes under AppClient. But, once signed in the user is never signed out even after the token expires. Once the token expires the app misbehaves until I signout in the app and sign back in (obviously session data). When the token expires shouldnt the app re-challenge?

Expected behavior

App should signout when token expires.

Reproduction steps

Using Authenticator class signin

Project Identifier

No response

Log output

# Put your logs below this line


Additional information

No response

Before submitting, please confirm:

  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
  • I have removed any sensitive information from my code snippets and submission.

Unable to reset password

Hi,

When trying to reset the password the error message "Passwords do not match." is shown, but the passwords do obviously match. (see image)

Using a version before 1.0.6 I'm able to reset the password.

IMG_4923

Provide default opt-in messaging with Authenticator if cognito is set up for sms 2FA

Hi !

I am having so much trouble getting opt-in messaging approved through aws campaign registration. They don't even say what is wrong with what i am doing except that it is non compliant opt-in.

It would be great if you guys can do a default compliant opt-in messaging in authenticator, which can be used to get a campaign registration and then finally then you can get a phone number for cognito to send messages from.

This is a feature request to make Authenticator more useful and more complete.

thanks,
Manish

Provide Support for previewing Authenticator in XCode

Currently, attempting to view the Authenticator component inside previews does not work.

There is no documentation on how to get it to work.

This is especially important when trying to fully customize the component.

image

public class ConfirmResetPasswordState is missing public func move(to ..)

Hi,

public class ConfirmResetPasswordState is missing following function:

public func move(to initialStep: AuthenticatorInitialStep) { authenticatorState.move(to: initialStep) }

Because of that I cannot set initial step in my custom reset password confirmation view to desired step (.signIn). Similar function can be found from public class ResetPasswordState implementation.

Xcode preview support for custom views

Is there a way to get Xcode preview working when using custom views? For example custom login preview gives error: "'SignInState' initializer is inaccessible due to 'internal' protection level"

struct MyCustomLoginView: View {
@StateObject var state: SignInState

var body: some View {
    VStack {
    ...
    ...
    }
}

}

#Preview {
let state = SignInState(...)
return MyCustomLoginView(state: state)
}

SignedInState in to new PreviewFactory

Hi,

Could you please add 'SignedInState' in to PreviewFactory as well?. Then it is possible to use Xcode preview in custom "MainView" implementation too.

Thanks!

Issue with label text and validation for email only login

I am using the "Use existing resources without the CLI" option as detailed here
I have configured cognito to use only email and password for login. However when using amplify-ui, it displays "username" instead of "email' in both the "create account" and "login" screens. No email validation is performed either.

image

My configuration file

{
  "auth": {
    "plugins": {
      "awsCognitoAuthPlugin": {
        "IdentityManager": {
          "Default": {}
        },
        "CognitoUserPool": {
          "Default": {
            "PoolId": "<MyPoolID>",
            "AppClientId": "<client id>",
            "Region": "eu-west-1"
          }
        },
        "Auth": {
          "Default": {
            "authenticationFlowType": "USER_SRP_AUTH",
            "passwordProtectionSettings": {
                "passwordPolicyMinLength": 8,
                "passwordPolicyCharacters": ["Requires Uppercase"]
            }
          }
        }
      }
    }
  }
}

If the user is automatically confirmed after Sign In, the Authenticator fails to Sign In and shows error

I have the following backend CDK

amplify/auth/resource.ts

import { defineAuth, defineFunction } from '@aws-amplify/backend';

/**
 * Define and configure your auth resource
 * @see https://docs.amplify.aws/gen2/build-a-backend/auth
 */
export const auth = defineAuth({
  loginWith: {
    email: true
  },
  triggers: {
    // configure a trigger to point to a function definition
    preSignUp: defineFunction({
      entry: './pre-sign-up-handler.ts'
    })
  }
});

amplify/auth/pre-sign-up-handler.ts

import type { PreSignUpTriggerHandler } from 'aws-lambda';

export const handler: PreSignUpTriggerHandler = async (event) => {
  // your code here
  event.response.autoConfirmUser = true
  return event;
};

When I use Authenticator to sign up with email, the user gets auto confirmed by the lambda, and Authenticator attempts to sign in the user.

The sign in fails

Attempting to Sign Up
Starting execution for Auth.signUpAPI
Starting execution
AWSCognitoAuthPlugin/LoadCredentialStore.swift Starting execution
Credential Store state change:

{
    "CredentialStoreState.loadingStoredCredentials" =     {
    };
}
AWSCognitoAuthPlugin/LoadCredentialStore.swift Retreiving credential deviceMetadata(username: "[email protected]")
AWSCognitoAuthPlugin/LoadCredentialStore.swift Sending event CredentialStoreEvent.throwError
AWSCognitoAuthPlugin/IdleCredentialStore.swift Starting execution
AWSCognitoAuthPlugin/IdleCredentialStore.swift Sending event CredentialStoreEvent.moveToIdleState
AWSCognitoAuthPlugin/LoadCredentialStore.swift Starting execution
AWSCognitoAuthPlugin/LoadCredentialStore.swift Retreiving credential asfDeviceId(username: "[email protected]")
Credential Store state change:

{
    "CredentialStoreState.error" =     {
        errorType = "KeychainStoreError: Unable to find the keychain item";
    };
}
Credential Store state change:

{
    "CredentialStoreState.idle" =     {
    };
}
Credential Store state change:

{
    "CredentialStoreState.loadingStoredCredentials" =     {
    };
}
AWSCognitoAuthPlugin/LoadCredentialStore.swift Sending event CredentialStoreEvent.throwError
AWSCognitoAuthPlugin/IdleCredentialStore.swift Starting execution
AWSCognitoAuthPlugin/IdleCredentialStore.swift Sending event CredentialStoreEvent.moveToIdleState
Credential Store state change:

{
    "CredentialStoreState.error" =     {
        errorType = "KeychainStoreError: Unable to find the keychain item";
    };
}
AWSCognitoAuthPlugin/StoreCredentials.swift Starting execution
Credential Store state change:

{
    "CredentialStoreState.idle" =     {
    };
}
AWSCognitoAuthPlugin/StoreCredentials.swift Sending event CredentialStoreEvent.completedOperation
Credential Store state change:

{
    "CredentialStoreState.storingCredentials" =     {
    };
}
AWSCognitoAuthPlugin/IdleCredentialStore.swift Starting execution
AWSCognitoAuthPlugin/IdleCredentialStore.swift Sending event CredentialStoreEvent.moveToIdleState
Credential Store state change:

{
    "CredentialStoreState.success" =     {
        savedData = "AWSCognitoAuthPlugin.CredentialStoreData.asfDeviceId(\"64464796-E53C-4A76-8FA8-DC936BD56DA5\", \"[email protected]\")";
    };
}
Credential Store state change:

{
    "CredentialStoreState.idle" =     {
    };
}
2024-04-30T14:01:49-0400 info CognitoIdentityProviderClient : [Logging] Request: POST https:443 
 Path: / 
 User-Agent: aws-sdk-swift/1.0 ua/2.0 api/cognito_identity_provider#1.0 os/ios#17.2.0 lang/swift#5.9 cfg/retry-mode#legacy, 
Content-Type: application/x-amz-json-1.1, 
Content-Length: 6423, 
X-Amz-Target: AWSCognitoIdentityProviderService.SignUp, 
Host: cognito-idp.us-east-1.amazonaws.com 
 nil
124163          HALC_ProxyIOContext.cpp:1328  HALC_ProxyIOContext::IOWorkLoop: skipping cycle due to overload
2024-04-30T14:01:50-0400 info URLSessionHTTPClient : [Logging] urlSession(_:dataTask:didReceive:) called
2024-04-30T14:01:50-0400 info URLSessionHTTPClient : [Logging] urlSession(_:dataTask:didReceive:) called with 71 bytes
2024-04-30T14:01:50-0400 info URLSessionHTTPClient : [Logging] urlSession(_:task:didCompleteWithError:) called. Success
Received result
Successfully completed execution for Auth.signUpAPI with result:
AuthSignUpResult(nextStep: Amplify.AuthSignUpStep.done, userID: Optional("e4489468-9041-704c-0be7-a541f8c192fe"))
Sign Up next step is done
Starting execution for Auth.signInAPI
Starting execution
Check if authstate configured
Auth state configured
Validating current state
Signing with userSRP
Sending signIn event
Waiting for signin to complete
AWSCognitoAuthPlugin/IntializeSignInFlow.swift Starting execution
AWSCognitoAuthPlugin/LoadCredentialStore.swift Starting execution
Credential Store state change:

{
    "CredentialStoreState.loadingStoredCredentials" =     {
    };
}
AWSCognitoAuthPlugin/LoadCredentialStore.swift Retreiving credential deviceMetadata(username: "")
Auth state change:

{
    "AuthState.configured" =     {
        "AuthenticationState.signingIn" =         {
            "SignInState.notStarted" =             {
            };
        };
        "AuthorizationState.sessionEstablished" = identityPoolOnly;
    };
}
Checking next step for: notStarted
AWSCognitoAuthPlugin/LoadCredentialStore.swift Sending event CredentialStoreEvent.throwError
AWSCognitoAuthPlugin/IdleCredentialStore.swift Starting execution
AWSCognitoAuthPlugin/IdleCredentialStore.swift Sending event CredentialStoreEvent.moveToIdleState
Credential Store state change:

{
    "CredentialStoreState.error" =     {
        errorType = "KeychainStoreError: Unable to find the keychain item";
    };
}
Credential Store state change:

{
    "CredentialStoreState.idle" =     {
    };
}
No existing device metadata found. AuthEnvironment(configuration: AWSCognitoAuthPlugin.AuthConfiguration.userPoolsAndIdentityPools(["verificationMechanisms": "[AWSCognitoAuthPlugin.UserPoolConfigurationData.VerificationMechanism.email]", "poolId": "us-e****XQHX", "endpoint": "N/A", "pinpointAppId": "(nil)", "usernameAttributes": "[AWSCognitoAuthPlugin.UserPoolConfigurationData.UsernameAttribute.email]", "signUpAttributes": "[AWSCognitoAuthPlugin.UserPoolConfigurationData.SignUpAttributeType.email]", "clientSecret": "(nil)", "region": "<REDACTED>", "clientId": "7531****8ajk", "hostedUI": "N/A", "passwordProtectionSettings": "Optional(AWSCognitoAuthPlugin.UserPoolConfigurationData.PasswordProtectionSettings(minLength: 8, characterPolicy: [AWSCognitoAuthPlugin.UserPoolConfigurationData.PasswordCharacterPolicy.lowercase, AWSCognitoAuthPlugin.UserPoolConfigurationData.PasswordCharacterPolicy.uppercase, AWSCognitoAuthPlugin.UserPoolConfigurationData.PasswordCharacterPolicy.numbers, AWSCognitoAuthPlugin.UserPoolConfigurationData.PasswordCharacterPolicy.symbols]))"], ["poolId": "us-e****2a05", "region": "<REDACTED>"]), userPoolConfigData: Optional(["verificationMechanisms": "[AWSCognitoAuthPlugin.UserPoolConfigurationData.VerificationMechanism.email]", "poolId": "us-e****XQHX", "endpoint": "N/A", "pinpointAppId": "(nil)", "usernameAttributes": "[AWSCognitoAuthPlugin.UserPoolConfigurationData.UsernameAttribute.email]", "signUpAttributes": "[AWSCognitoAuthPlugin.UserPoolConfigurationData.SignUpAttributeType.email]", "clientSecret": "(nil)", "region": "<REDACTED>", "clientId": "7531****8ajk", "hostedUI": "N/A", "passwordProtectionSettings": "Optional(AWSCognitoAuthPlugin.UserPoolConfigurationData.PasswordProtectionSettings(minLength: 8, characterPolicy: [AWSCognitoAuthPlugin.UserPoolConfigurationData.PasswordCharacterPolicy.lowercase, AWSCognitoAuthPlugin.UserPoolConfigurationData.PasswordCharacterPolicy.uppercase, AWSCognitoAuthPlugin.UserPoolConfigurationData.PasswordCharacterPolicy.numbers, AWSCognitoAuthPlugin.UserPoolConfigurationData.PasswordCharacterPolicy.symbols]))"]), identityPoolConfigData: Optional(["poolId": "us-e****2a05", "region": "<REDACTED>"]), authenticationEnvironment: Optional(AWSCognitoAuthPlugin.BasicAuthenticationEnvironment(srpSignInEnvironment: AWSCognitoAuthPlugin.BasicSRPSignInEnvironment(srpAuthEnvironment: AWSCognitoAuthPlugin.BasicSRPAuthEnvironment(userPoolConfiguration: ["verificationMechanisms": "[AWSCognitoAuthPlugin.UserPoolConfigurationData.VerificationMechanism.email]", "poolId": "us-e****XQHX", "endpoint": "N/A", "pinpointAppId": "(nil)", "usernameAttributes": "[AWSCognitoAuthPlugin.UserPoolConfigurationData.UsernameAttribute.email]", "signUpAttributes": "[AWSCognitoAuthPlugin.UserPoolConfigurationData.SignUpAttributeType.email]", "clientSecret": "(nil)", "region": "<REDACTED>", "clientId": "7531****8ajk", "hostedUI": "N/A", "passwordProtectionSettings": "Optional(AWSCognitoAuthPlugin.UserPoolConfigurationData.PasswordProtectionSettings(minLength: 8, characterPolicy: [AWSCognitoAuthPlugin.UserPoolConfigurationData.PasswordCharacterPolicy.lowercase, AWSCognitoAuthPlugin.UserPoolConfigurationData.PasswordCharacterPolicy.uppercase, AWSCognitoAuthPlugin.UserPoolConfigurationData.PasswordCharacterPolicy.numbers, AWSCognitoAuthPlugin.UserPoolConfigurationData.PasswordCharacterPolicy.symbols]))"], cognitoUserPoolFactory: (Function), eventIDFactory: (Function), srpClientFactory: (Function), srpConfiguration: (nHexValue: "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF", gHexValue: "2"))), userPoolEnvironment: AWSCognitoAuthPlugin.BasicUserPoolEnvironment(userPoolConfiguration: ["pinpointAppId": "(nil)", "clientId": "7531****8ajk", "signUpAttributes": "[AWSCognitoAuthPlugin.UserPoolConfigurationData.SignUpAttributeType.email]", "passwordProtectionSettings": "Optional(AWSCognitoAuthPlugin.UserPoolConfigurationData.PasswordProtectionSettings(minLength: 8, characterPolicy: [AWSCognitoAuthPlugin.UserPoolConfigurationData.PasswordCharacterPolicy.lowercase, AWSCognitoAuthPlugin.UserPoolConfigurationData.PasswordCharacterPolicy.uppercase, AWSCognitoAuthPlugin.UserPoolConfigurationData.PasswordCharacterPolicy.numbers, AWSCognitoAuthPlugin.UserPoolConfigurationData.PasswordCharacterPolicy.symbols]))", "usernameAttributes": "[AWSCognitoAuthPlugin.UserPoolConfigurationData.UsernameAttribute.email]", "poolId": "us-e****XQHX", "verificationMechanisms": "[AWSCognitoAuthPlugin.UserPoolConfigurationData.VerificationMechanism.email]", "clientSecret": "(nil)", "region": "<REDACTED>", "endpoint": "N/A", "hostedUI": "N/A"], cognitoUserPoolFactory: (Function), cognitoUserPoolASFFactory: (Function), cognitoUserPoolAnalyticsHandlerFactory: (Function)), hostedUIEnvironment: nil)), authorizationEnvironment: Optional(AWSCognitoAuthPlugin.BasicAuthorizationEnvironment(identityPoolConfiguration: ["region": "<REDACTED>", "poolId": "us-e****2a05"], cognitoIdentityFactory: (Function), eventIDFactory: (Function))), credentialsClient: AWSCognitoAuthPlugin.CredentialStoreOperationClient, logger: Amplify.BroadcastLogger)
AWSCognitoAuthPlugin/IntializeSignInFlow.swift Sending event SignInEvent.initiateSignInWithSRP
AWSCognitoAuthPlugin/StartSRPFlow.swift Start execution
AWSCognitoAuthPlugin/StartSRPFlow.swift Sending event SignInEvent.initiateSignInWithSRP
Auth state change:

{
    "AuthState.configured" =     {
        "AuthenticationState.signingIn" =         {
            "SignInState.signingInWithSRP" =             {
                "SRPSignInState.notStarted" =                 {
                };
                clientMetadata =                 {
                };
                password = "<REDACTED>";
                signInMethod = "AWSCognitoAuthPlugin.SignInMethod.apiBased(AWSCognitoAuthPlugin.AuthFlowType.userSRP)";
                username = "";
            };
        };
        "AuthorizationState.sessionEstablished" = identityPoolOnly;
    };
}
Checking next step for: signingInWithSRP(AWSCognitoAuthPlugin.SRPSignInState.notStarted, ["username": "", "password": "<REDACTED>", "clientMetadata": [:], "signInMethod": AWSCognitoAuthPlugin.SignInMethod.apiBased(AWSCognitoAuthPlugin.AuthFlowType.userSRP)])
Checking next step for: signingInWithSRP(AWSCognitoAuthPlugin.SRPSignInState.error(AWSCognitoAuthPlugin.SignInError.inputValidation(field: "username")), ["username": "", "password": "<REDACTED>", "clientMetadata": [:], "signInMethod": AWSCognitoAuthPlugin.SignInMethod.apiBased(AWSCognitoAuthPlugin.AuthFlowType.userSRP)])
Auth state change:

{
    "AuthState.configured" =     {
        "AuthenticationState.signingIn" =         {
            "SignInState.signingInWithSRP" =             {
                "SRPSignInState.error" =                 {
                    Error = "AWSCognitoAuthPlugin.SignInError.inputValidation(field: \"username\")";
                };
                clientMetadata =                 {
                };
                password = "<REDACTED>";
                signInMethod = "AWSCognitoAuthPlugin.SignInMethod.apiBased(AWSCognitoAuthPlugin.AuthFlowType.userSRP)";
                username = "";
            };
        };
        "AuthorizationState.sessionEstablished" = identityPoolOnly;
    };
}
Wait for signIn to cancel
Auth state change:

{
    "AuthState.configured" =     {
        "AuthenticationState.signedOut" =         {
            lastKnownUserName = "(nil)";
        };
        "AuthorizationState.configured" =         {
        };
    };
}
Failed execution for Auth.signInAPI with error:
AuthError: Username is required to signIn
Recovery suggestion: Make sure that a valid username is passed during signIn
Unable to Sign In after sucessfull sign up
The operation couldn’t be completed. (Amplify.AuthError error 3.)
AuthError: Username is required to signIn
Recovery suggestion: Make sure that a valid username is passed during signIn
The operation couldn’t be completed. (Amplify.AuthError error 3.)
AuthError: Username is required to signIn
Recovery suggestion: Make sure that a valid username is passed during signIn
Creating an unknown AuthenticatorError
AuthError: Username is required to signIn
Recovery suggestion: Make sure that a valid username is passed during signIn

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.