Skip to content

autoSignIn() only works in a happy path #3135

@KamilSucharski

Description

@KamilSucharski

Before opening, please confirm:

Language and Async Model

RxJava

Amplify Categories

Authentication

Gradle script dependencies

// Put output below this line
    implementation 'com.amplifyframework:core:2.30.1'
    implementation 'com.amplifyframework:aws-auth-cognito:2.30.1'
    implementation 'com.amplifyframework:rxbindings:2.30.1'
    coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.5'

Environment information

# Put output below this line
------------------------------------------------------------
Gradle 9.0.0
------------------------------------------------------------

Build time:    2025-07-31 16:35:12 UTC
Revision:      328772c6bae126949610a8beb59cb227ee580241

Kotlin:        2.2.0
Groovy:        4.0.27
Ant:           Apache Ant(TM) version 1.10.15 compiled on August 25 2024
Launcher JVM:  21.0.6 (JetBrains s.r.o. 21.0.6+-13391695-b895.109)
Daemon JVM:    D:\Programs\Android\Android Studio\jbr (no JDK specified, using current Java home)
OS:            Windows 11 10.0 amd64


Please include any relevant guides or documentation you're referencing

No response

Describe the bug

The autoSignIn() only works in a happy path, that is:

  1. signUp
  2. confirmSignUp
  3. autoSignIn

But it gets stuck (no result returned from the autoSignIn() method) if I do this:

  1. signUp
  2. confirmSignUp with wrong code
  3. confirmSignUp with correct code
  4. autoSignIn <-- stuck

or this:

  1. signUp
  2. clear app data, signIn, still need to activate this account
  3. confirmSignUp
  4. autoSignIn <-- stuck

Previously this wasn't an issue for me, since I just performed the login for the user, and that always worked, but once we started using 2FA, the user was asked to enter the confirm account code, and then immediately after to enter the 2FA code.

I am told this works on iOS.

Reproduction steps (if applicable)

No response

Code Snippet

// Put your code below this line.

Log output

// Put your logs below this line


Configuration File

No response

GraphQL Schema

// Put your schema below this line

Additional information and screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    authRelated to the Auth category/pluginsbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions