Custom OAuth callback times out when Merge roles from SSO is enabled
Maintainer thường phản hồi trong vòng 1 ngày
@Pantkartik đang làm issue này rồi.
Từ ngày 28/11/2026.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 82/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- authentication, backend
Hướng nghiên cứu
Bắt đầu tại oauth.ts:73, nơi settings.rolesToSync.split(',') được gọi. Cập nhật logic hợp nhất vai trò để xử lý rolesToSync không xác định, sau đó xác minh rằng đăng nhập Custom OAuth với Authentik thành công thay vì gây ra TypeError không được xử lý và HTTP 504.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description:
Custom OAuth authentication fails when Merge roles from SSO is enabled and rolesToSync is undefined.
Steps to reproduce:
- Configure Custom OAuth using Authentik.
- Enable Merge roles from SSO with
rolesToSyncundefined. - Attempt authentication using Authentik.
Expected behavior:
Successful authentication and login to Rocket.Chat.
Actual behavior:
Authentik authentication, token exchange and user information retrieval succeed. Rocket.Chat throws an unhandled TypeError, resulting in a 504 Gateway Timeout.
Server Setup Information:
- Version of Rocket.Chat Server: 9.0.0
- License Type: Starter
- Number of Users: 10
- Operating System: Debian
- Deployment Method: Docker Compose
- Number of Running Instances: 1
- DB Replicaset Oplog: Replica set configured
- NodeJS Version: Not recorded
- MongoDB Version: Not recorded
Client Setup Information
- Desktop App or Browser Version: Chrome
- Operating System: Linux
Additional context
Authentication was also failing under Rocket.Chat 8.8, prompting the upgrade to 9.0.0. Whether the underlying defect was identical remains unverified.
The affected code assumes rolesToSync is a string:
settings.rolesToSync.split(',').map((role) => role.trim())
The stored configuration contains mergeRoles: true and rolesToSync: undefined.
Verified workaround: Disable Merge roles from SSO, save and refresh OAuth services. Authentication then succeeds.
Relevant logs:
Server exception, reproduced three times:
TypeError: Cannot read properties of undefined (reading 'split')
at oauth.ts:73:26
Associated with an unhandled promise rejection.
Reverse proxy: HTTP 504 at /_oauth/authentik.
Authentik token exchange and user information endpoints both returned HTTP 200.
- Ngôn ngữ chính
- TypeScript
- Star
- 46.6k
- Fork
- 14.2k
- Merge trung bình
- 2 ngày 21 giờ
- Pull request đã merge (30 ngày)
- 302
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của RocketChat/Rocket.Chat
-
ModerationConsoleTable renders blank area instead of error state when query failsCó thể đã có người làm @Siddharth-singh18 đã nhận 2 ngày trước. Đang mởtype: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
RocketChat/Rocket.Chat#44109 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Composer clears message text when the first uploaded file's media confirmation failsCó thể đã có người làm @Sravan-0802 đã nhận 1 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
RocketChat/Rocket.Chat#44087 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Subsequent OAuth logins overwrite persisted service fields (e.g. refreshToken) with nullCó thể đã có người làm @ayushbuilds-code đã nhận 4 ngày trước. Đang mởtype: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
RocketChat/Rocket.Chat#44053 · 4 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Heads-up: Issue Dedupe workflow pins claude-sonnet-4-5-20250929, which Anthropic retires Nov 30Có thể đã có người làm @Ravichandra531 đã nhận 6 ngày trước. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 70/100
RocketChat/Rocket.Chat#43944 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
DDP `encodeResult` drops falsy method return values (`false`, `0`, `""`, `null`)Có thể đã có người làm @Arnav-0206 đã nhận 9 ngày trước. Đang mởtype: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
RocketChat/Rocket.Chat#43925 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của RocketChat/Rocket.Chat
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
zabuton-app/meguri#875 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
iruzen-dono/workless#117 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:api area:web wave wave:trivial
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
vetro-protocol/vetro-monorepo#1321 ·
Maintainer thường phản hồi trong vòng 1 ngày