Update imessage-2fa extension
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
Checklist
- [x] I read the extension guidelines
- [x] I read the documentation about publishing
- [x] I ran
npm run buildand tested this distribution build in Raycast - [x] I checked that files in the
assetsfolder are used by the extension itself - [x] I checked that assets used by the
READMEare placed outside of themetadatafolder
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.
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
providerIdvalues - 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
useEffecthook 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.tsandextensions/imessage-2fa/src/account-manager.tsxfor 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. |
@greptileai is it fixed?
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 😊