Skip to content

Auth/refactor reset auto signin wrapper #14418

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

sirenye
Copy link

@sirenye sirenye commented Jun 4, 2025

Description of changes

Refactored the resetAutoSignIn() function in autoSignIn.ts by introducing two named wrapper functions:

resetAutoSignInCompletely() — triggers the reset and reset callback

resetAutoSignInStoreOnly() — resets the store only without invoking the callback

This change improves readability and intent clarity when resetting auto sign-in state throughout the authentication flow.

Also fixed lint errors by removing void return values and formatting code to satisfy Prettier.

Issue #, if available

#14405

Description of how you validated changes

Ran yarn lint --fix to resolve formatting issues

Confirmed all tests pass via:
yarn test
and
yarn test --scope @aws-amplify/auth

Confirmed all license and compliance checks pass

Checklist

  • PR description included
  • yarn test passes
  • Unit Tests are not changed (behavior unchanged, internal refactor)
  • No documentation changes required

Checklist for repo maintainers

  • Verify E2E tests for existing workflows are working as expected or add E2E tests for newly added workflows
  • New source file paths included in this PR have been added to CODEOWNERS, if appropriate

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Siteproxy

Siteproxy

搜索引擎


常用网站


新闻网站


海外论坛


@ahmedhamouda78
Copy link
Member

Hello @sirenye, we have decided to keep the current implementation as it is, since this is an internal function and adding wrapper functions will introduce maintenance overhead where we will need to modify/add the wrapper functions anytime we change the parameters of resetAutoSignIn

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.

None yet

2 participants