extensions icon indicating copy to clipboard operation
extensions copied to clipboard

Update imessage-2fa extension

Open hyusap opened this issue 2 weeks ago • 3 comments

Description

This PR adds support for multiple Gmail accounts to be logged in simultaneously. Users can add, authorize, and manage multiple accounts from an action within the extension.

Screencast

image image image image image image

Checklist

hyusap avatar Dec 22 '25 01:12 hyusap

Thank you for your contribution! :tada:

🔔 @yuercl @thomaspaulmann @arronhunt @ronaldheft @hitolaus @taschaub @omaerkhan @clins1994 you might want to have a look.

You can use this guide to learn how to check out the Pull Request locally in order to test it.

📋 Quick checkout commands
BRANCH="ext/imessage-2fa"
FORK_URL="https://github.com/hyusap/extensions.git"
EXTENSION_NAME="imessage-2fa"
REPO_NAME="extensions"

git clone -n --depth=1 --filter=tree:0 -b $BRANCH $FORK_URL
cd $REPO_NAME
git sparse-checkout set --no-cone "extensions/$EXTENSION_NAME"
git checkout
cd "extensions/$EXTENSION_NAME"
npm install && npm run dev

Due to our current reduced availability, the initial review may take up to 10-15 business days.

raycastbot avatar Dec 22 '25 01:12 raycastbot

Greptile Summary

Adds multi-account Gmail support, allowing users to manage multiple Gmail accounts simultaneously. Key changes include:

  • Added account storage layer (storage.ts) for managing multiple Gmail accounts with unique IDs
  • Created account management UI (account-manager.tsx) with add, authorize, rename, and remove functionality
  • Refactored Gmail OAuth to support per-account OAuth clients using unique providerId values
  • Updated main UI to display account tags and handle empty account states with proper onboarding
  • Added comprehensive OAuth setup instructions in OAuthErrorView.tsx

Issues found:

  • OAuth tokens are not cleaned up when accounts are removed, leaving orphaned credentials in storage
  • Missing dependency in useEffect hook in account manager could lead to stale closures

Confidence Score: 3/5

  • This PR has functional issues that should be addressed before merging
  • The multi-account implementation is well-structured overall, but has two important bugs: OAuth tokens aren't cleaned up when accounts are removed (leaving credentials in storage), and a missing useEffect dependency could cause stale closure issues. These are fixable but should be addressed.
  • Pay close attention to extensions/imessage-2fa/src/storage.ts and extensions/imessage-2fa/src/account-manager.tsx for the OAuth cleanup and useEffect dependency issues

Important Files Changed

Filename Overview
extensions/imessage-2fa/src/storage.ts New file managing account storage with add/remove/rename operations. Missing OAuth token cleanup on account removal.
extensions/imessage-2fa/src/account-manager.tsx New account management UI with authorization workflow. Well-structured with proper error handling.
extensions/imessage-2fa/src/gmail.ts Refactored to support multiple OAuth clients per account. Token management and API calls properly handle multi-account scenarios.
extensions/imessage-2fa/src/index.tsx Updated to integrate multi-account Gmail support with account tags in UI. Properly handles empty account states.

greptile-apps[bot] avatar Dec 22 '25 04:12 greptile-apps[bot]

@greptileai is it fixed?

hyusap avatar Dec 22 '25 16:12 hyusap

This pull request has been automatically marked as stale because it did not have any recent activity.

It will be closed if no further activity occurs in the next 7 days to keep our backlog clean 😊

raycastbot avatar Jan 06 '26 16:01 raycastbot