Skip to content

feat: centralize auth and add google sign-in#5

Merged
olgahaha merged 2 commits intomainfrom
feature/auth-google-integration
Dec 17, 2025
Merged

feat: centralize auth and add google sign-in#5
olgahaha merged 2 commits intomainfrom
feature/auth-google-integration

Conversation

@olgahaha
Copy link
Copy Markdown
Contributor

  • 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.

- 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.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.launchWebAuthFlow with 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
@olgahaha olgahaha merged commit 53c9132 into main Dec 17, 2025
@olgahaha olgahaha deleted the feature/auth-google-integration branch December 17, 2025 02:07
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>
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.

2 participants