Repository navigation
Change login flow for gmail - #49
Conversation
…ating environment configurations. The .env.example file now includes GMAIL_OAUTH_CLIENT_ID and GMAIL_PUBSUB_TOPIC for better clarity on app-specific settings. The AccountView has been updated to utilize the new GoogleGmailOAuthService for handling OAuth, while the GmailProviderConnectionService has been refactored to streamline credential verification. Additionally, tests have been added to ensure proper handling of Apple client values and OAuth requests.
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
Important Review skippedNo new commits to review since the last review. ⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughChangesApple configuration and build wiring
Google PKCE authorization
Gmail credential verification
Account sign-in integration
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant AccountView
participant GmailProviderConnectionViewModel
participant GoogleGmailOAuthService
participant Google
participant GoogleGmailProviderCredentialVerifier
AccountView->>GmailProviderConnectionViewModel: Tap Sign in with Google
GmailProviderConnectionViewModel->>GoogleGmailOAuthService: authorize()
GoogleGmailOAuthService->>Google: PKCE authorization and token exchange
Google-->>GoogleGmailOAuthService: Access and refresh tokens
GoogleGmailOAuthService-->>GmailProviderConnectionViewModel: Return tokens
GmailProviderConnectionViewModel->>GoogleGmailProviderCredentialVerifier: verify(tokens)
GoogleGmailProviderCredentialVerifier->>Google: Check profile, subject, scope, and refresh
Google-->>GoogleGmailProviderCredentialVerifier: Verification responses
GoogleGmailProviderCredentialVerifier-->>GmailProviderConnectionViewModel: Verified Gmail account
Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@README.md`:
- Line 40: Update the developer setup documentation around the Convex
environment configuration to reference the repository-root .env.local
consistently with the updated Convex script, replacing any
packages/convex/.env.local instructions. Ensure the setup and common-command
guidance tells developers where to place the required values so fresh setups use
the configured environment.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 456db136-4b62-482a-b251-3748d1cdb56e
⛔ Files ignored due to path filters (1)
packages/convex/convex/_generated/api.d.tsis excluded by!**/_generated/**
📒 Files selected for processing (13)
.env.example.gitignoreREADME.mdapps/unwired-mail/unwired-mail.xcodeproj/project.pbxprojapps/unwired-mail/unwired-mail/Features/Account/AccountView.swiftapps/unwired-mail/unwired-mail/Services/DotEnvFile.swiftapps/unwired-mail/unwired-mail/Services/ProductAccount/GmailProviderConnectionService.swiftapps/unwired-mail/unwired-mail/Services/ProductAccount/GoogleGmailOAuthService.swiftapps/unwired-mail/unwired-mail/Shared.xcconfigapps/unwired-mail/unwired-mailTests/DotEnvFileTests.swiftapps/unwired-mail/unwired-mailTests/GmailProviderConnectionServiceTests.swiftdocs/bootstrap-review.mdpackages/convex/package.json
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: acd818c8de
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 52e534e07c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
apps/unwired-mail/unwired-mail.xcodeproj/project.pbxproj (1)
489-502: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winDo not override OAuth settings with empty target values.
Because target-level settings override
Shared.xcconfig, these empty assignments causeInfo.plistto resolveGmailOAuthClientIdandCFBundleURLSchemesto empty strings in both Debug and Release. Google cannot return to the app, so the login flow fails. Remove these assignments or provide real per-configuration values.Proposed fix
- GMAIL_OAUTH_CALLBACK_SCHEME = ""; - GMAIL_OAUTH_CLIENT_ID = ""; - GMAIL_PUBSUB_TOPIC = "";Apply this to both Debug and Release unless these values are intentionally supplied directly in the target configuration.
Also applies to: 523-536
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/unwired-mail/unwired-mail.xcodeproj/project.pbxproj` around lines 489 - 502, Remove the empty GMAIL_OAUTH_CALLBACK_SCHEME and GMAIL_OAUTH_CLIENT_ID assignments from the target buildSettings blocks for both Debug and Release, allowing Shared.xcconfig values to flow through; only retain target-level assignments if they contain valid per-configuration OAuth values.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@apps/unwired-mail/unwired-mail.xcodeproj/project.pbxproj`:
- Around line 489-502: Remove the empty GMAIL_OAUTH_CALLBACK_SCHEME and
GMAIL_OAUTH_CLIENT_ID assignments from the target buildSettings blocks for both
Debug and Release, allowing Shared.xcconfig values to flow through; only retain
target-level assignments if they contain valid per-configuration OAuth values.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 08b16322-a9d4-4534-b5a6-bf6a9d1195c8
📒 Files selected for processing (3)
README.mdapps/unwired-mail/unwired-mail.xcodeproj/project.pbxprojapps/unwired-mail/unwired-mail/Info.plist
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f303a2de9b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Need help on this PR? Tag
@codesmithwith what you need. Autofix is disabled.Summary by CodeRabbit
.env.localwith app-specific overrides.