feat: centralize auth and add google sign-in#5
Merged
Conversation
- Centralize Authentication: Moved all login/logout and account management from the Options page to the Popup for a streamlined user experience. - Google Auth: Implemented Google Sign-In and Sign-Up flows using `chrome.identity`. - UI Polish: Replaced emoji placeholders with professional SVG icons across Popup and Options pages. - Refactor: Decomposed PopupApp into modular sub-components PopupHeader, CaptureSection, AssetList for improved readability.
There was a problem hiding this comment.
Pull request overview
This pull request centralizes authentication functionality from the Options page to the Popup, adds Google Sign-In using Chrome's identity API, replaces emoji icons with professional SVG icons, and refactors the PopupApp component into smaller, more maintainable sub-components.
Key Changes:
- Implemented Google OAuth authentication flow using
chrome.identity.launchWebAuthFlowwith OIDC ID tokens - Moved login/logout functionality from Options page to Popup for streamlined user experience
- Refactored PopupApp into modular components (PopupHeader, CaptureSection, AssetList, PopupFooter)
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| src/types/index.ts | Added START_GOOGLE_AUTH message type for background script communication |
| src/services/StorageService.ts | Added methods to persist and retrieve Google auth error messages across popup sessions |
| src/services/NumbersApiManager.ts | Made username optional in signup, added loginGoogle method, made clearAuth async |
| src/services/AuthService.ts | Implemented Google authentication via Chrome Identity API with OIDC ID tokens and token cleanup |
| src/popup/popup.tsx | Refactored into sub-components, added logout functionality, replaced LoginForm with AuthForm, added email display |
| src/popup/popup.css | Added styles for account details display in header |
| src/popup/LoginForm.tsx | Removed old login-only form component |
| src/popup/AuthForm.tsx | New unified authentication form supporting login, signup, and Google authentication |
| src/options/options.tsx | Removed account management section, replaced emoji icons with SVG icons |
| src/options/options.css | Added flex layout for h1 to accommodate inline SVG icons |
| src/background/service-worker.ts | Added START_GOOGLE_AUTH message handler to manage Google auth flow from background |
| manifest.json | Added identity permission and oauth2 configuration with client ID and scopes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Secure nonce and ignore manifest keys - Extract auth styles and fix popup layout - Add accessibility attributes to icons - Fix logout state and error handling - Update configuration docs
Copilot AI
added a commit
that referenced
this pull request
Mar 13, 2026
- Add touch event support in selection overlay (issue #1) - Add keyboard navigation/ARIA for asset grid (issue #2) - Add Forgot Password flow in AuthForm (issue #3) - Replace simulated progress with XHR real progress (issue #4) - Add restricted tab URL check before captureVisibleTab (issue #5) - Pass output format/quality to offscreen watermark (issue #6) - Add 30s timeout for offscreen operations (issue #7) - Add ctx.save()/ctx.restore() around canvas drawing (issue #8) - Convert share page from raw DOM to React (issue #9) - Extract inline styles to CSS classes (issue #10) - Rename createSignedMetadata to createMetadataPayload (issue #11) - Add sourcemap: 'hidden' to vite.config.ts (issue #12) - Add pre-build version sync validation (issue #13) Co-authored-by: numbers-official <181934381+numbers-official@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
chrome.identity.