bug: "Login on web" button not shown when only Nextcloud login provider is configured
维护者通常 4 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 74/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- react-native, typescript
- 领域
- mobile
调研方向
从 app/lib/services/connect.ts 中的 getLoginServices 和 app/containers/LoginServices/index.tsx 中的回退检查开始。追踪带有 hideButtonOnMobile: true 的不受支持 OAuth 服务如何处理,然后检查 Nextcloud 是唯一提供方时登录屏幕的行为。对于此配置,应用显示“Login on web”即表示完成;issue 没有指定测试文件。
由索引模型根据 Issue 内容生成。
描述
Describe the Bug
The only external login on our workspace is the built-in Nextcloud OAuth provider. The default login form is disabled. In the mobile app, the login screen shows no login option at all, only "New user registration is currently disabled". The "Login on web" does not appear, so users can't log in from the app.
Login through the same provider works fine in the web client.
Steps to Reproduce
- On a Rocket.Chat 9.x server, enable the built-in Nextcloud OAuth provider (Administration → Settings → OAuth → Nextcloud) and make sure no other OAuth provider is enabled (no Custom OAuth, Google, GitHub, etc.).
- Disable the default login form (
Accounts_ShowFormLogin= false). - Set registration to disabled (
Accounts_RegistrationForm= Disabled). - Check that
GET /api/v1/settings.oauthreturns only thenextcloudservice withhideButtonOnMobile: true. - Open the Rocket.Chat mobile app (4.79.0) and add the workspace.
- Look at the login screen.
Expected Behavior
"Login on web" should also appear when the server returns OAuth services that the app does not support natively. Since 9.0, all OAuth logins use the server-side flow, so the web login can handle any provider.
Actual Behavior
The login screen shows only the workspace name, the URL and the text "New user registration is currently disabled". There is no Nextcloud button, no "Login on web" button and no login form, so users have no way to log in from the app.
In the web client, the same workspace shows the Nextcloud button and the login works as expected.
If a Custom OAuth provider is enabled as well, the "Login on web" button appears in the app. The web page it opens shows the Nextcloud button, and the login through Nextcloud completes successfully in the app.
Rocket.Chat Server Version
9.x.x
Rocket.Chat App Version
4.79.0 (110274)
Device Name
iPhone 16
OS Version
iOS 27.2.1
Additional Context
Root cause (from source)
-
getLoginServicesdrops every service thatdetermineAuthTypeclassifies asnot_supported.nextcloudis not inavailableOAuth, so the service is removed fromstate.login.services: -
LoginServicesonly shows "Login on web" if a service that is still in that list hashideButtonOnMobile: true. Services that were already dropped don't count:
So a workspace whose providers are all unsupported never gets the "Login on web" fallback.
Workaround / confirmation
If we also enable a Custom OAuth provider (which is kept as oauth_custom and hidden because of hideButtonOnMobile: true), "Login on web" appears. The web page it opens shows the Nextcloud button, and the login completes successfully in the app. This only works with a Premium license, since Custom OAuth is premium-only from 9.0.
- 主要语言
- TypeScript
- 星标
- 2.4k
- 派生
- 1.5k
- 平均合并
- 5 天 16 小时
- 30 天内合并 PR
- 38
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
RocketChat/Rocket.Chat.ReactNative 的其他 Issue
-
Release network security config allows plain HTTP to 10.0.2.2 and localhost可能已有人在做 @samarkumar4355 于 2 天前认领。 未关闭type: bug
难度 2/5 1-3 小时 新手友好度 67/100
RocketChat/Rocket.Chat.ReactNative#7941 · 2 条评论 ·
维护者通常 4 天内回复
-
[IMPROVEMENT] Remove redundant `await` on synchronous `userPreferences.getBool` in `getUsersPresence`可能已有人在做 @sandeepannandi 于 2 天前认领。 未关闭type: feature
难度 1/5 1 小时以内 新手友好度 92/100
RocketChat/Rocket.Chat.ReactNative#7737 · 1 条评论 ·
维护者通常 4 天内回复
-
✅ tests 👷 ci type: feature
难度 2/5 1-3 小时 新手友好度 65/100
RocketChat/Rocket.Chat.ReactNative#7247 · 1 条评论 ·
维护者通常 4 天内回复
-
bug: goRoom navigates to broken RoomView after failed DM creation from search可能已有人在做 @deepak0x 于 235 天前认领。 未关闭type: bug
难度 2/5 1-3 小时 新手友好度 78/100
RocketChat/Rocket.Chat.ReactNative#7098 ·
维护者通常 4 天内回复
-
Bug Fix: slugifyLikeString skips sanitization due to unassigned replace() result可能已有人在做 @deepak0x 于 389 天前认领。 未关闭🐛 bug
难度 2/5 1-3 小时 新手友好度 65/100
RocketChat/Rocket.Chat.ReactNative#6782 · 1 条评论 ·
维护者通常 4 天内回复
查看 RocketChat/Rocket.Chat.ReactNative 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
zabuton-app/meguri#875 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 86/100
iruzen-dono/workless#117 ·
维护者通常 1 天内回复
-
area:api area:web wave wave:trivial
难度 2/5 1-3 小时 新手友好度 67/100
-
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 76/100
vetro-protocol/vetro-monorepo#1321 ·
维护者通常 1 天内回复