Skip to content

feat: add new identity hooks#14045

Merged
mathieuartu merged 4 commits into
mainfrom
feat/add-new-identity-hooks
Mar 17, 2025
Merged

feat: add new identity hooks#14045
mathieuartu merged 4 commits into
mainfrom
feat/add-new-identity-hooks

Conversation

@mathieuartu

@mathieuartu mathieuartu commented Mar 17, 2025

Copy link
Copy Markdown
Contributor

Description

This PR adds new identity hooks. This is part of a wider effort to make sure that mobile has the same logic that extension has regarding auth & profile syncing. Note that this PR, as being part 1 of this effort, doesn't introduce any changes, it only adds code pieces that'll be linked to wider logic changes in subsequent PRs.

This PR:

  • Introduces useIdentityEffects "master" hook that encapsulates any automatic identity actions dispatch (for now, authentication, but in the future it will contain syncing effects)
  • Introduces useAutoSignIn and useAutoSignOut hooks, that reactively manages the user's authentication state based on the current application state

Related issues

Related to:

Manual testing steps

  1. No changes to test, the new code is not used yet

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@mathieuartu mathieuartu self-assigned this Mar 17, 2025
@mathieuartu mathieuartu added the team-identity-deprecated DEPRECATED: team no longer exists label Mar 17, 2025
@github-actions

Copy link
Copy Markdown
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@github-actions

github-actions Bot commented Mar 17, 2025

Copy link
Copy Markdown
Contributor

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 582f710
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/e7256f1e-f768-4b38-be4a-e3b258a95d13

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@mathieuartu mathieuartu added No QA Needed Apply this label when your PR does not need any QA effort. and removed Run Smoke E2E labels Mar 17, 2025
@mathieuartu mathieuartu added No E2E Smoke Needed No QA Needed Apply this label when your PR does not need any QA effort. and removed No QA Needed Apply this label when your PR does not need any QA effort. No E2E Smoke Needed labels Mar 17, 2025
@mathieuartu mathieuartu marked this pull request as ready for review March 17, 2025 12:09
@mathieuartu mathieuartu requested review from a team as code owners March 17, 2025 12:09
mirceanis
mirceanis previously approved these changes Mar 17, 2025
Comment thread app/util/identity/hooks/useAuthentication/useAutoSignOut.test.ts Outdated
@sonarqubecloud

Copy link
Copy Markdown

@tommasini tommasini left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing! Thank you for splitting up the work! LGTM

@mathieuartu mathieuartu added this pull request to the merge queue Mar 17, 2025
Merged via the queue into main with commit 4c34ce9 Mar 17, 2025
@mathieuartu mathieuartu deleted the feat/add-new-identity-hooks branch March 17, 2025 17:58
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 17, 2025
@metamaskbot metamaskbot added the release-7.44.0 Issue or pull request that will be included in release 7.44.0 label Mar 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

No QA Needed Apply this label when your PR does not need any QA effort. release-7.44.0 Issue or pull request that will be included in release 7.44.0 team-identity-deprecated DEPRECATED: team no longer exists

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants