Skip to content

fix: Github OAuth not getting user emails#39753

Merged
dionisio-bot[bot] merged 7 commits intodevelopfrom
fix/github-oauth-email
Mar 20, 2026
Merged

fix: Github OAuth not getting user emails#39753
dionisio-bot[bot] merged 7 commits intodevelopfrom
fix/github-oauth-email

Conversation

@yash-rajpal
Copy link
Copy Markdown
Member

@yash-rajpal yash-rajpal commented Mar 20, 2026

Proposed changes (including videos or screenshots)

We recently moved out Github OAuth away from meteor to our custom oAuth implementation #37604 , this introduced a bug where we were not getting user's email address when user was being logged in using Github OAuth provider.

This is because Github by default doesn't return us the user's email in user identity which is very different from how other OAuth providers work, due to which users were bring signed up/logged in without an email address.

Our current custom OAuth implementation wasn't equipped to handle such cases. This PR adds the ability for our custom OAuth to handle such cases and fetch emails separately if the config providers an email fetch path. This fixes the issue for Github OAuth.

Issue(s)

CORE-1986

Steps to test or reproduce

Further comments

Summary by CodeRabbit

  • New Features

    • OAuth providers can include a secondary email endpoint to fetch missing emails.
    • Email retrieval now supports asynchronous fetching using the access token.
    • GitHub OAuth queries the dedicated emails endpoint to improve email discovery.
  • Bug Fixes

    • Restored persistent saving of user emails for OAuth logins when the primary identity lacks an email.

@yash-rajpal yash-rajpal requested a review from a team as a code owner March 20, 2026 00:54
@dionisio-bot
Copy link
Copy Markdown
Contributor

dionisio-bot bot commented Mar 20, 2026

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 20, 2026

🦋 Changeset detected

Latest commit: f763d35

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 41 packages
Name Type
@rocket.chat/core-typings Patch
@rocket.chat/meteor Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/api-client Patch
@rocket.chat/apps Patch
@rocket.chat/core-services Patch
@rocket.chat/cron Patch
@rocket.chat/ddp-client Patch
@rocket.chat/fuselage-ui-kit Patch
@rocket.chat/gazzodown Patch
@rocket.chat/http-router Patch
@rocket.chat/livechat Patch
@rocket.chat/model-typings Patch
@rocket.chat/rest-typings Patch
@rocket.chat/ui-avatar Patch
@rocket.chat/ui-client Patch
@rocket.chat/ui-contexts Patch
@rocket.chat/ui-voip Patch
@rocket.chat/web-ui-registration Patch
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/abac Patch
@rocket.chat/federation-matrix Patch
@rocket.chat/license Patch
@rocket.chat/media-calls Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/network-broker Patch
@rocket.chat/omni-core-ee Patch
@rocket.chat/mock-providers Patch
@rocket.chat/models Patch
@rocket.chat/ui-video-conf Patch
@rocket.chat/instance-status Patch
@rocket.chat/omni-core Patch
@rocket.chat/server-fetch Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 20, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

CustomOAuth now accepts an optional emailPath (made absolute when relative). getIdentity forwards accessToken into the new async normalizeIdentity(identity, accessToken), which may call getEmailFromPath(accessToken) to fetch a primary email from the configured endpoint when identity lacks an email. GitHub config adds emailPath.

Changes

Cohort / File(s) Summary
OAuth Type Definition
packages/core-typings/src/OauthConfig.ts
Added optional emailPath?: string to OauthConfig.
CustomOAuth Core Implementation
apps/meteor/app/custom-oauth/server/custom_oauth_server.js
Stored options.emailPath (prepended with serverURL if relative); getIdentity passes accessToken to normalizeIdentity; changed normalizeIdentity(identity)async normalizeIdentity(identity, accessToken); added async getEmailFromPath(accessToken) which requests emailPath (uses Bearer header or access token param depending on identityTokenSentVia), validates response, parses JSON, returns the primary email, and throws errors that include provider name and emailPath.
GitHub OAuth Configuration
apps/meteor/app/github/server/lib.ts
Added emailPath: 'https://api.github.com/user/emails' to the GitHub OauthConfig.
Changeset
.changeset/rare-planes-tan.md
Added changeset documenting a patch release fixing missing persisted GitHub emails.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant CustomOAuth
    participant IdentityProvider as Identity Provider
    participant EmailProvider as Email Endpoint

    Client->>CustomOAuth: Login / exchange code
    CustomOAuth->>IdentityProvider: GET identity (include accessToken)
    IdentityProvider-->>CustomOAuth: Identity response

    alt identity contains email
        CustomOAuth->>CustomOAuth: async normalizeIdentity(identity, accessToken) — use email
    else identity lacks email and emailPath configured
        CustomOAuth->>EmailProvider: GET emailPath (Authorization: Bearer accessToken or accessToken param)
        EmailProvider-->>CustomOAuth: Email list response
        CustomOAuth->>CustomOAuth: parse primary email and set identity.email
        CustomOAuth->>CustomOAuth: async normalizeIdentity(identity, accessToken)
    end

    CustomOAuth-->>Client: Complete authentication (session/token)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested labels

type: bug, area: authentication

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix: Github OAuth not getting user emails' directly describes the main change—fixing the GitHub OAuth email retrieval issue, which is the core purpose of this PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@yash-rajpal yash-rajpal added this to the 8.3.0 milestone Mar 20, 2026
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

2 issues found across 3 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/meteor/app/custom-oauth/server/custom_oauth_server.js">

<violation number="1" location="apps/meteor/app/custom-oauth/server/custom_oauth_server.js:79">
P2: `emailPath` is never resolved against `serverURL` for relative paths, unlike `tokenPath` and `identityPath`. A relative `emailPath` will cause a runtime fetch failure. Add the same `isAbsoluteURL` guard after the existing path resolutions.</violation>

<violation number="2" location="apps/meteor/app/custom-oauth/server/custom_oauth_server.js:266">
P1: Debug `console.log` left in production code. This leaks user PII (email, name, etc.) to stdout on every OAuth login. Remove it or replace with `logger.debug`.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@yash-rajpal yash-rajpal added the stat: QA assured Means it has been tested and approved by a company insider label Mar 20, 2026
@dionisio-bot dionisio-bot bot added stat: ready to merge PR tested and approved waiting for merge stat: QA assured Means it has been tested and approved by a company insider and removed stat: QA assured Means it has been tested and approved by a company insider labels Mar 20, 2026
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
apps/meteor/app/custom-oauth/server/custom_oauth_server.js (2)

79-103: ⚠️ Potential issue | 🟠 Major

Normalize emailPath the same way as the other OAuth endpoints.

tokenPath and identityPath support relative values, but emailPath is stored as-is. A provider configured with emailPath: '/user/emails' will now fetch a hostless URL and the fallback breaks even though the rest of the config is valid.

Suggested fix
 		if (!isAbsoluteURL(this.identityPath)) {
 			this.identityPath = this.serverURL + this.identityPath;
 		}
+
+		if (this.emailPath && !isAbsoluteURL(this.emailPath)) {
+			this.emailPath = this.serverURL + this.emailPath;
+		}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/meteor/app/custom-oauth/server/custom_oauth_server.js` around lines 79 -
103, Normalize emailPath like tokenPath and identityPath: detect when
this.emailPath is not an absolute URL using isAbsoluteURL and, if not, prepend
this.serverURL so the stored this.emailPath becomes absolute. Update the
constructor/init block that currently adjusts this.tokenPath and
this.identityPath to also handle this.emailPath, referencing the same helper
isAbsoluteURL and this.serverURL so provider configs with relative emailPath
(e.g., '/user/emails') are resolved correctly.

248-254: ⚠️ Potential issue | 🟠 Major

Don't let getEmail() short-circuit the new fallback.

If this.emailField is configured but missing in the primary payload, this.getEmail(identity) throws on Lines 327-329, so Lines 252-253 are never reached. That makes the new emailPath flow ineffective for providers that keep emailField enabled and only need the secondary endpoint when the field is absent.

One way to keep the fallback reachable
-		if (this.emailField) {
-			identity.email = this.getEmail(identity);
-		}
+		if (this.emailField) {
+			const extractedEmail = fromTemplate(this.emailField, identity);
+			if (extractedEmail) {
+				identity.email = extractedEmail;
+			} else if (!this.emailPath) {
+				throw new Meteor.Error('field_not_found', `Email field "${this.emailField}" not found in data`, identity);
+			}
+		}
 
 		if (!identity.email && this.emailPath) {
 			identity.email = await this.getEmailFromPath(accessToken);
 		}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/meteor/app/custom-oauth/server/custom_oauth_server.js` around lines 248
- 254, The current call to this.getEmail(identity) when this.emailField is set
can throw and prevents the emailPath fallback; update the flow so a missing
primary email doesn't short-circuit the fallback by either (a) performing a safe
presence check before calling getEmail (e.g. verify the configured emailField
exists on the identity payload) or (b) wrapping the this.getEmail(identity) call
in a try/catch that only swallows the "missing email" case and leaves other
errors to bubble; ensure identity.email remains undefined/null on missing
primary so the subsequent if (!identity.email && this.emailPath) branch can
invoke this.getEmailFromPath(accessToken). Use the symbols this.emailField,
getEmail(identity), getEmailFromPath(accessToken), and identity.email to locate
the code to change.
🧹 Nitpick comments (1)
apps/meteor/app/custom-oauth/server/custom_oauth_server.js (1)

277-277: Remove the new implementation comments in this helper.

They don't add much beyond the code and reintroduce inline comments into the JS implementation.

As per coding guidelines Avoid code comments in the implementation.

Also applies to: 288-289

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/meteor/app/custom-oauth/server/custom_oauth_server.js` at line 277,
Remove the inline implementation comments that follow the header assignments in
the custom OAuth helper where the request headers are built (specifically the
comment after "'User-Agent': this.userAgent" and the additional
new-implementation comments around the same header block at the later lines);
edit the helper that constructs the headers so it only contains the header
key/value pairs (e.g., "'User-Agent': this.userAgent") without the trailing
URL/comment text and remove the related comments at the other occurrences (lines
near the same header block), keeping only code and no inline explanatory
comments.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/meteor/app/custom-oauth/server/custom_oauth_server.js`:
- Line 266: Remove the raw payload console logging that prints sensitive OAuth
data: delete or replace the console.log('identity', identity) call (and the
similar log at the other occurrence) so you no longer dump the normalized
identity or provider email response; if you need telemetry, log only
non-sensitive metadata (e.g., provider name, user id, or success/failure flags)
by referencing the same locations where identity is used (look for the
console.log calls that print the identity variable and the provider email
response) and ensure no full profile or email objects are emitted.

---

Outside diff comments:
In `@apps/meteor/app/custom-oauth/server/custom_oauth_server.js`:
- Around line 79-103: Normalize emailPath like tokenPath and identityPath:
detect when this.emailPath is not an absolute URL using isAbsoluteURL and, if
not, prepend this.serverURL so the stored this.emailPath becomes absolute.
Update the constructor/init block that currently adjusts this.tokenPath and
this.identityPath to also handle this.emailPath, referencing the same helper
isAbsoluteURL and this.serverURL so provider configs with relative emailPath
(e.g., '/user/emails') are resolved correctly.
- Around line 248-254: The current call to this.getEmail(identity) when
this.emailField is set can throw and prevents the emailPath fallback; update the
flow so a missing primary email doesn't short-circuit the fallback by either (a)
performing a safe presence check before calling getEmail (e.g. verify the
configured emailField exists on the identity payload) or (b) wrapping the
this.getEmail(identity) call in a try/catch that only swallows the "missing
email" case and leaves other errors to bubble; ensure identity.email remains
undefined/null on missing primary so the subsequent if (!identity.email &&
this.emailPath) branch can invoke this.getEmailFromPath(accessToken). Use the
symbols this.emailField, getEmail(identity), getEmailFromPath(accessToken), and
identity.email to locate the code to change.

---

Nitpick comments:
In `@apps/meteor/app/custom-oauth/server/custom_oauth_server.js`:
- Line 277: Remove the inline implementation comments that follow the header
assignments in the custom OAuth helper where the request headers are built
(specifically the comment after "'User-Agent': this.userAgent" and the
additional new-implementation comments around the same header block at the later
lines); edit the helper that constructs the headers so it only contains the
header key/value pairs (e.g., "'User-Agent': this.userAgent") without the
trailing URL/comment text and remove the related comments at the other
occurrences (lines near the same header block), keeping only code and no inline
explanatory comments.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 055cf6b0-4189-47ef-84cd-31b7168499d0

📥 Commits

Reviewing files that changed from the base of the PR and between 1741a20 and e790f5f.

📒 Files selected for processing (3)
  • apps/meteor/app/custom-oauth/server/custom_oauth_server.js
  • apps/meteor/app/github/server/lib.ts
  • packages/core-typings/src/OauthConfig.ts
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: 📦 Build Packages
  • GitHub Check: cubic · AI code reviewer
  • GitHub Check: CodeQL-Build
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js}

📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)

**/*.{ts,tsx,js}: Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests
Avoid code comments in the implementation

Files:

  • packages/core-typings/src/OauthConfig.ts
  • apps/meteor/app/github/server/lib.ts
  • apps/meteor/app/custom-oauth/server/custom_oauth_server.js
🧠 Learnings (6)
📓 Common learnings
Learnt from: smirk-dev
Repo: RocketChat/Rocket.Chat PR: 39625
File: apps/meteor/app/api/server/v1/push.ts:85-97
Timestamp: 2026-03-14T14:58:58.834Z
Learning: In RocketChat/Rocket.Chat, the `push.token` POST/DELETE endpoints in `apps/meteor/app/api/server/v1/push.ts` were already migrated to the chained router API pattern on `develop` prior to PR `#39625`. `cleanTokenResult` (which strips `authToken` and returns `PushTokenResult`) and `isPushTokenPOSTProps`/`isPushTokenDELETEProps` validators already exist on `develop`. PR `#39625` only migrates `push.get` and `push.info` to the chained pattern. Do not flag `cleanTokenResult` or `PushTokenResult` as newly introduced behavior-breaking changes when reviewing this PR.
Learnt from: amitb0ra
Repo: RocketChat/Rocket.Chat PR: 39647
File: apps/meteor/app/api/server/v1/users.ts:710-757
Timestamp: 2026-03-15T14:31:28.969Z
Learning: In RocketChat/Rocket.Chat, the `UserCreateParamsPOST` type in `apps/meteor/app/api/server/v1/users.ts` (migrated from `packages/rest-typings/src/v1/users/UserCreateParamsPOST.ts`) intentionally has `fields: string` (non-optional) and `settings?: IUserSettings` without a corresponding AJV schema entry. This is a pre-existing divergence carried over verbatim from the original rest-typings source (PR `#39647`). Do not flag this type/schema misalignment during the OpenAPI migration review — it is tracked as a separate follow-up fix.
📚 Learning: 2026-03-16T21:50:42.118Z
Learnt from: amitb0ra
Repo: RocketChat/Rocket.Chat PR: 39676
File: .changeset/migrate-users-register-openapi.md:3-3
Timestamp: 2026-03-16T21:50:42.118Z
Learning: In RocketChat/Rocket.Chat OpenAPI migration PRs, removing endpoint types and validators from `rocket.chat/rest-typings` (e.g., `UserRegisterParamsPOST`, `/v1/users.register` entry) is the *required* migration pattern per RocketChat/Rocket.Chat-Open-API#150 Rule 7 ("No More rest-typings or Manual Typings"). The endpoint type is re-exposed via a module augmentation `.d.ts` file in the consuming package (e.g., `packages/web-ui-registration/src/users-register.d.ts`). This is NOT a breaking change — the correct changeset bump for `rocket.chat/rest-typings` in this scenario is `minor`, not `major`. Do not flag this as a breaking change during OpenAPI migration reviews.

Applied to files:

  • packages/core-typings/src/OauthConfig.ts
  • apps/meteor/app/github/server/lib.ts
📚 Learning: 2026-02-26T19:25:44.063Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 38778
File: packages/ui-voip/src/providers/useMediaSession.ts:192-192
Timestamp: 2026-02-26T19:25:44.063Z
Learning: In the Rocket.Chat repository, do not reference Biome lint rules in code review feedback. Biome is not used even if biome.json exists; only reference Biome rules if there is explicit, project-wide usage documented. For TypeScript files, review lint implications without Biome guidance unless the project enables Biome rules.

Applied to files:

  • packages/core-typings/src/OauthConfig.ts
  • apps/meteor/app/github/server/lib.ts
📚 Learning: 2026-02-26T19:25:44.063Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 38778
File: packages/ui-voip/src/providers/useMediaSession.ts:192-192
Timestamp: 2026-02-26T19:25:44.063Z
Learning: In this repository (RocketChat/Rocket.Chat), Biome lint rules are not used even if a biome.json exists. When reviewing TypeScript files (e.g., packages/ui-voip/src/providers/useMediaSession.ts), ensure lint suggestions do not reference Biome-specific rules. Rely on general ESLint/TypeScript lint rules and project conventions instead.

Applied to files:

  • packages/core-typings/src/OauthConfig.ts
  • apps/meteor/app/github/server/lib.ts
📚 Learning: 2026-03-15T14:31:28.969Z
Learnt from: amitb0ra
Repo: RocketChat/Rocket.Chat PR: 39647
File: apps/meteor/app/api/server/v1/users.ts:710-757
Timestamp: 2026-03-15T14:31:28.969Z
Learning: In RocketChat/Rocket.Chat, the `UserCreateParamsPOST` type in `apps/meteor/app/api/server/v1/users.ts` (migrated from `packages/rest-typings/src/v1/users/UserCreateParamsPOST.ts`) intentionally has `fields: string` (non-optional) and `settings?: IUserSettings` without a corresponding AJV schema entry. This is a pre-existing divergence carried over verbatim from the original rest-typings source (PR `#39647`). Do not flag this type/schema misalignment during the OpenAPI migration review — it is tracked as a separate follow-up fix.

Applied to files:

  • apps/meteor/app/github/server/lib.ts
📚 Learning: 2026-03-09T23:46:52.173Z
Learnt from: ricardogarim
Repo: RocketChat/Rocket.Chat PR: 39492
File: apps/meteor/app/oauth2-server-config/server/oauth/oauth2-server.ts:22-24
Timestamp: 2026-03-09T23:46:52.173Z
Learning: In `apps/meteor/app/oauth2-server-config/server/oauth/oauth2-server.ts`, the `oAuth2ServerAuth` function's `authorization` field in `partialRequest` is exclusively expected to carry Bearer tokens. Basic authentication is not supported in this OAuth flow, so there is no need to guard against non-Bearer schemes when extracting the token from the `Authorization` header.

Applied to files:

  • apps/meteor/app/github/server/lib.ts
  • apps/meteor/app/custom-oauth/server/custom_oauth_server.js

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 1 file (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/meteor/app/custom-oauth/server/custom_oauth_server.js">

<violation number="1" location="apps/meteor/app/custom-oauth/server/custom_oauth_server.js:105">
P1: `emailPath` is normalized even when unset, turning `undefined` into an invalid URL and triggering failing email fetches.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Copy link
Copy Markdown
Member

@ricardogarim ricardogarim left a comment

Choose a reason for hiding this comment

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

non-blocking: the emailPath parsing is GitHub-specific, which is fine since it’s currently the only provider that needs it.

for future extensibility, we could consider adding normalizers similar to what we have for identityPath. we can create a follow-up task for that.

@yash-rajpal
Copy link
Copy Markdown
Member Author

non-blocking: the emailPath parsing is GitHub-specific, which is fine since it’s currently the only provider that needs it.
for future extensibility, we could consider adding normalizers similar to what we have for identityPath. we can create a follow-up task for that.

You're absolutely right that this implementation is mostly Github specific but we don't need to extend it since very soon all of this legacy OAuth stuff will be replaced by new Passport implementation.

@KevLehman
Copy link
Copy Markdown
Member

You're absolutely right

image

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.50%. Comparing base (cb7b203) to head (f763d35).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #39753      +/-   ##
===========================================
+ Coverage    70.37%   70.50%   +0.12%     
===========================================
  Files         3238     3243       +5     
  Lines       114939   115243     +304     
  Branches     20928    20947      +19     
===========================================
+ Hits         80891    81247     +356     
+ Misses       32001    31940      -61     
- Partials      2047     2056       +9     
Flag Coverage Δ
e2e 60.46% <ø> (+0.17%) ⬆️
e2e-api 49.17% <ø> (+1.37%) ⬆️
unit 70.95% <ø> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ricardogarim
Copy link
Copy Markdown
Member

i was testing locally and, both with and without the change, the email showed up for me on the RC side…

so i checked the GH docs and the thing is: if the user has a public email, it shows up on the /user route. otherwise, you need to call /user/emails to list the private ones.

@yash-rajpal
Copy link
Copy Markdown
Member Author

Exactly, this is the reason that this bug went unnoticed. When I last worked on it, it was working as expected since the account I used for testing had public email address.

It was only today I realized this bug when I was testing with a new account with no public email address.

@rc-layne
Copy link
Copy Markdown

rc-layne bot commented Mar 20, 2026

🔴 Layne — 1 finding(s)

Found 1 issue(s): 1 high.

@julio-rocketchat
Copy link
Copy Markdown
Member

🔴 Layne — 3 finding(s)

Found 3 issue(s): 3 high.

We can ignore Layne's comment on this one. There are security comments in the code (and Layne should've picked that up, but I'll fix the bug that made it not see it)

@dionisio-bot dionisio-bot bot added this pull request to the merge queue Mar 20, 2026
@julio-rocketchat
Copy link
Copy Markdown
Member

🔴 Layne — 3 finding(s)

Found 3 issue(s): 3 high.

We can ignore Layne's comment on this one. There are security comments in the code (and Layne should've picked that up, but I'll fix the bug that made it not see it)

Looks like it's working as expected now

Merged via the queue into develop with commit 78e37dc Mar 20, 2026
45 of 46 checks passed
@dionisio-bot dionisio-bot bot deleted the fix/github-oauth-email branch March 20, 2026 16:57
ggazzo pushed a commit that referenced this pull request Mar 25, 2026
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: Julio Araujo <[email protected]>
ggazzo pushed a commit that referenced this pull request Mar 25, 2026
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: Julio Araujo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: authentication needs-security-review stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge type: bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants