Skip to content

chore: kickoff release - #4235

Merged
harsh62 merged 1 commit into
releasefrom
main
Jun 15, 2026
Merged

chore: kickoff release#4235
harsh62 merged 1 commit into
releasefrom
main

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

kickoff release

#4231)

* fix(auth): defer keychain-sharing reconfigure during in-flight sign-in

When AWSCognitoAuthPlugin is configured with a shared keychain access
group, every fetchAuthSession unconditionally sent a .reconfigure event
to the auth state machine. If a fetchAuthSession landed between a
sign-in step that returned .confirmSignInWithCustomChallenge and the
caller's confirmSignIn, the reconfigure tore down the .signingIn
substate and the next confirmSignIn threw
AuthError.invalidState("User is not attempting signIn operation").

Replace the unconditional reconfigure with a reconcile that:

- Reads the shared keychain credentials, compares against the local
  state machine's authZ credentials, and skips reconfigure when they
  match — eliminating wasted reconfigures on every fetch.
- Defers reconfigure during locally-originated in-flight flows
  (.signingIn, .signingOut, .deletingUser, .federatingToIdentityPool,
  .clearingFederation) when the keychain has no signed-in credentials.
- Adopts a sibling app's sign-in by reconfiguring even during
  .signingIn when the remote keychain has user-pool tokens. Relax the
  AWSAuthConfirmSignInTask top-level guard to accept .signedIn and
  return .done so the pending confirmSignIn resolves cleanly.

Fixes #4224.

* refactor(auth): consolidate confirmSignIn state dispatch into a switch

Fold the .signedIn early-return into the same switch that handles
.signingIn dispatch. The listener loop already returns .done on
.signedIn(.sessionEstablished), so the early return was redundant —
the only thing the .signedIn branch needs to do is skip the event
dispatch that's specific to the .signingIn path.

* refactor(auth): inline .signedIn handling into analyzeCurrentStateAndCreateEvent and clarify keychain/state-machine fetch helper names

Move the .signedIn early-return for shared-keychain adoption into
analyzeCurrentStateAndCreateEvent so execute() has a single guard +
single dispatch. Rename fetchRemoteCredentials and the local-state
snapshot helper to fetchCredentialsFromKeychain and
fetchCredentialsFromStateMachine to make the source-of-truth pairing
explicit at the call site.
@github-actions
github-actions Bot requested a review from a team as a code owner June 15, 2026 14:02
@harsh62
harsh62 merged commit 08d079b into release Jun 15, 2026
529 of 534 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant