Skip to content

After confirming sign-up via Sign In flow, redirects to Create Account instead of completing sign-in #6901

Description

@shibmana

On which framework/platform would you like to see this feature implemented?

React

Which UI component is this feature-request for?

Authenticator

Please describe your feature-request in detail.

Summary

When a user signs up, closes the browser before confirming, then returns and confirms their account via the Sign In flow, the Authenticator redirects to the empty Create Account tab instead of completing sign-in.

Steps to Reproduce

  1. Open the app and go to Create Account
  2. Create a new account
  3. When the Confirmation Code screen appears, close the browser
  4. Reopen the app and go to Sign In
  5. Sign in with the newly created credentials
  6. Enter the Confirmation Code when prompted
  7. Redirected to empty Create Account tab
  8. Clicking Sign In tab and signing in again works correctly

Expected Behavior

At Step 7, after confirming the account via the Sign In flow, the user should be signed in automatically — not redirected to the Create Account screen.

This is the behavior observed in the Flutter Authenticator, where confirmSignUp is followed by a direct signIn() call, completing sign-in regardless of session state.

Environment

  • @aws-amplify/ui-react: ^6.15.1
  • aws-amplify: ^6.16.2
  • React 19

Please describe a solution you'd like.

In React's withAuthenticator, when a user completes sign-up and confirms their account in the same session, autoSignIn is invoked and sign-in completes automatically. However, when the user reaches ConfirmSignUp via the Sign In flow (e.g., after closing the browser before confirming), autoSignIn is called but always fails — because the callback registered during signUp() no longer exists in the new session, and
signIn() never registers it.

Unlike Flutter, React cannot fall back to calling signIn() directly after confirmSignUp in this case, because the password has already been cleared from the form state before autoSignIn is attempted.

The ideal fix would be to match Flutter's behavior: after entering the confirmation code from the Sign In flow, sign-in should complete automatically.

At a minimum, instead of redirecting the user to the empty Create Account tab, the Authenticator should redirect to the Sign In tab and display a message indicating that the account has been confirmed and the user needs to sign in again.

We love contributors! Is this something you'd be interested in working on?

  • 👋 I may be able to implement this feature request.
  • ⚠️ This feature might incur a breaking change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    AuthAuthenticatorAn issue or a feature-request for an Authenticator UI ComponentbugSomething isn't workingfeature-requestRequest a new feature

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions