Skip to content

feat: Only displaying the quick connect option - #3315

Open
Billos wants to merge 9 commits into
seerr-team:developfrom
Billos:feat/only-quick-connect-option
Open

feat: Only displaying the quick connect option#3315
Billos wants to merge 9 commits into
seerr-team:developfrom
Billos:feat/only-quick-connect-option

Conversation

@Billos

@Billos Billos commented Jul 30, 2026

Copy link
Copy Markdown

Description

This PR adds a new setting called quickConnectOnly.
If ticked, the JellyfinLogin will hide the classic username / password form and only display the Quick Connect button

Allowing the users to log in with username and password forces the Jellyfin server to keep the local or LDAP Authentication service. Forcing them to use the Quick Connect allows the Jellyfin server to use the OIDC only.

How Has This Been Tested?

Tested in the webUI.

Screenshots / Logs (if applicable)

Enregistrement.d.ecran_20260730_121729.webm

AI Usage

Claude was used to understand some elements of the codebase and what should be changed.
Code was hand written with the goal to be sure of what I'm editing and why.

Checklist:

  • I have read and followed the contribution guidelines.
  • Disclosed any use of AI (see our policy)
  • I have updated the documentation accordingly.
  • All new and existing tests passed.
  • Successful build pnpm build
  • Translation keys pnpm i18n:extract
  • Database migration (if required) - Not required

Summary by CodeRabbit

  • New Features

    • Added a “Quick Connect Only” setting for media-server sign-in.
    • Administrators can restrict Jellyfin/Emby authentication to Quick Connect.
    • When enabled, username and password login fields are hidden, and password-based sign-in is rejected.
    • The setting is available in user settings with explanatory guidance and is disabled by default.
  • Bug Fixes

    • Corrected checkbox labels so they properly associate with their fields.

Copilot AI lite review requested due to automatic review settings July 30, 2026 10:48
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

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

Walkthrough

The PR adds a persisted quickConnectOnly setting. Administrators can enable it for Jellyfin or Emby login. The setting propagates through public settings and hides or rejects username/password Jellyfin login.

Changes

Quick Connect-only authentication

Layer / File(s) Summary
Settings contract and propagation
seerr-api.yml, server/interfaces/api/settingsInterfaces.ts, server/lib/settings/index.ts, src/context/SettingsContext.tsx, src/pages/_app.tsx
Defines quickConnectOnly, defaults it to false, exposes it through public settings, and adds it to fallback settings objects.
Administrative setting controls
src/components/Settings/SettingsUsers/index.tsx, src/components/Common/LabeledCheckbox/index.tsx, src/i18n/locale/en.json
Adds the persisted Quick Connect-only checkbox for Jellyfin and Emby login, resets it when media-server login is disabled, and adds translations and dynamic label association.
Jellyfin login enforcement
src/components/Login/JellyfinLogin.tsx, server/routes/auth.ts
Hides the username/password form when Quick Connect-only mode is enabled and rejects password-based Jellyfin login requests.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant SettingsUsers
  participant Settings
  participant SettingsContext
  participant JellyfinLogin
  participant AuthRoute

  SettingsUsers->>Settings: Save quickConnectOnly
  Settings->>SettingsContext: Expose quickConnectOnly
  SettingsContext->>JellyfinLogin: Provide quickConnectOnly
  JellyfinLogin->>JellyfinLogin: Hide username/password form when enabled
  JellyfinLogin->>AuthRoute: Submit Jellyfin password login
  AuthRoute-->>JellyfinLogin: Return HTTP 403 restriction error
Loading

Possibly related PRs

  • seerr-team/seerr#1855: Adds and propagates a boolean setting through schemas, interfaces, defaults, public settings, UI, and localization.
  • seerr-team/seerr#2212: Modifies Quick Connect authentication in the same login components and route.
  • seerr-team/seerr#3369: Modifies Quick Connect behavior in JellyfinLogin.tsx and server/routes/auth.ts.

Suggested reviewers: 0xsysr3ll, gauthier-th

Poem

A rabbit sets the Quick Connect sign,
The password form leaves the line.
Jellyfin checks the setting bright,
Public settings carry it right.
Hop, hop—the default stays false.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: displaying only the Quick Connect login option.
Linked Issues check ✅ Passed The changes implement issue #3300 by adding a persisted setting that hides password login and enforces Quick Connect authentication.
Out of Scope Changes check ✅ Passed All changes support the Quick Connect-only setting, including configuration, API types, authentication enforcement, UI, translations, and fallback defaults.

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.

@Billos Billos changed the title Feature: Only displaying the quick connect option feat: Only displaying the quick connect option Jul 30, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a new quickConnectOnly setting intended to allow administrators to hide Jellyfin’s classic username/password login UI and encourage (or enforce) Quick Connect-based sign-in, supporting Jellyfin configurations that rely on OIDC-only authentication.

Changes:

  • Introduces quickConnectOnly as a main/public setting across server + client settings models.
  • Adds an admin UI toggle (Jellyfin-only) under Settings → Users to enable Quick Connect-only mode.
  • Updates the Jellyfin login screen to hide the username/password form when quickConnectOnly is enabled.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/pages/_app.tsx Adds quickConnectOnly to initial settings defaults.
src/context/SettingsContext.tsx Adds quickConnectOnly to client-side default settings context.
src/components/Settings/SettingsUsers/index.tsx Adds the new Settings UI toggle and persists it via /api/v1/settings/main.
src/components/Login/JellyfinLogin.tsx Hides username/password form when quickConnectOnly is enabled; keeps Quick Connect button available.
server/lib/settings/index.ts Adds the setting to MainSettings and includes it in the full public settings payload.
server/interfaces/api/settingsInterfaces.ts Exposes the setting in PublicSettingsResponse typing.
src/i18n/locale/en.json Adds translations for the new Settings toggle.
src/i18n/locale/fr.json Adds translations for the new Settings toggle and the Quick Connect label.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/components/Settings/SettingsUsers/index.tsx Outdated
Comment thread src/components/Settings/SettingsUsers/index.tsx Outdated
Comment thread src/components/Login/JellyfinLogin.tsx
Copilot AI review requested due to automatic review settings July 30, 2026 10:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

src/components/Settings/SettingsUsers/index.tsx:217

  • This nested LabeledCheckbox inherits a known accessibility/UX issue from src/components/Common/LabeledCheckbox/index.tsx where the internal <label> uses a hard-coded htmlFor="localLogin". As a result, the label text for this new quickConnectOnly checkbox won’t correctly toggle/focus its checkbox (and may toggle the wrong checkbox), which is especially confusing with nested checkboxes. The LabeledCheckbox component should use htmlFor={id} instead.
                            <LabeledCheckbox
                              id="quickConnectOnly"
                              label={intl.formatMessage(
                                messages.quickConnectOnly
                              )}

Comment thread src/components/Login/JellyfinLogin.tsx
Copilot AI review requested due to automatic review settings July 30, 2026 10:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

src/components/Login/JellyfinLogin.tsx:136

  • quickConnectOnly currently only hides the username/password <Form> in the UI. Users can still authenticate with credentials by calling the existing /api/v1/auth/jellyfin endpoint directly, which means this setting does not actually “only allow” Quick Connect sign-in.

Consider enforcing this server-side (e.g., reject credential-based Jellyfin login when settings.main.quickConnectOnly is true), or adjust the setting label/tooltip to clearly indicate it only affects the UI.

              {!quickConnectOnly && (
                <Form data-form-type="login">
                  <div>

Copilot AI review requested due to automatic review settings July 30, 2026 11:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (2)

src/components/Login/JellyfinLogin.tsx:49

  • quickConnectOnly is applied regardless of the current media server type. Since JellyfinLogin is also used for Emby (see Login/index.tsx where isJellyfin includes MediaServerType.EMBY), a stale quickConnectOnly=true setting (e.g. after switching servers) would hide the username/password form for Emby and effectively force a Jellyfin-only Quick Connect flow.
  const quickConnectOnly = settings.currentSettings.quickConnectOnly;

server/lib/settings/index.ts:721

  • quickConnectOnly is exposed in fullPublicSettings even when the configured mediaServerType is not Jellyfin. If the setting remains true after switching away from Jellyfin, clients could still treat Quick Connect-only mode as enabled and hide credential login, potentially causing a lockout.
      localLogin: this.data.main.localLogin,
      mediaServerLogin: this.data.main.mediaServerLogin,
      quickConnectOnly: this.data.main.quickConnectOnly,
      jellyfinExternalHost: this.data.jellyfin.externalHostname,

Copilot AI review requested due to automatic review settings July 30, 2026 11:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

src/components/Login/JellyfinLogin.tsx:49

  • quickConnectOnly is applied even when this component is being used for an Emby server (serverType === MediaServerType.EMBY). Since the Quick Connect flow is implemented against Jellyfin-specific endpoints (/QuickConnect/* in server/api/jellyfin.ts), enabling this setting while configured for Emby can hide the only working sign-in method and effectively lock users out. Gate the flag so it only hides the username/password form for Jellyfin.
  const quickConnectOnly = settings.currentSettings.quickConnectOnly;

Comment thread src/components/Settings/SettingsUsers/index.tsx
Copilot AI review requested due to automatic review settings July 30, 2026 12:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (2)

server/routes/auth.ts:265

  • The error message returned when quickConnectOnly is enabled is misleading: this endpoint is the username/password Jellyfin login, so telling the caller it "can only be used with Quick Connect enabled" reads like Quick Connect must also be enabled to use password login. Consider changing the message to explicitly state that username/password login is disabled and users must use Quick Connect.
  if (settings.main.quickConnectOnly) {
    return res.status(500).json({
      error: 'Jellyfin login can only be used with Quick Connect enabled.',
    });
  }

server/routes/auth.ts:265

  • quickConnectOnly introduces a new login-blocking branch in POST /auth/jellyfin, but the existing auth route tests only cover the Quick Connect endpoints (see server/routes/auth.test.ts). Adding a test that asserts this endpoint rejects username/password login when settings.main.quickConnectOnly is true would prevent regressions.
  if (settings.main.quickConnectOnly) {
    return res.status(500).json({
      error: 'Jellyfin login can only be used with Quick Connect enabled.',
    });
  }

@Billos
Billos marked this pull request as ready for review July 30, 2026 12:30
@Billos
Billos requested a review from a team as a code owner July 30, 2026 12:30
@Billos
Billos force-pushed the feat/only-quick-connect-option branch from 600b942 to 2491ed7 Compare July 30, 2026 12:31
@Billos
Billos requested a review from Copilot July 30, 2026 13:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (3)

src/components/Settings/SettingsUsers/index.tsx:86

  • isJellyfin is also true for MediaServerType.EMBY, so the name is misleading. Renaming it will make the condition’s intent clearer (and avoid confusion if Jellyfin/Emby behavior diverges later).
  const isJellyfin =
    settings.currentSettings.mediaServerType === MediaServerType.JELLYFIN ||
    settings.currentSettings.mediaServerType === MediaServerType.EMBY;

src/components/Settings/SettingsUsers/index.tsx:214

  • Follow-up to the rename: update the usage site to match the new isJellyfinOrEmby variable name.
                        {values.mediaServerLogin && isJellyfin && (

server/routes/auth.ts:265

  • This branch rejects password-based Jellyfin/Emby sign-in when quickConnectOnly is enabled, but it responds with HTTP 500 (server error). Since this is an intentional policy restriction, a 4xx (e.g., 403 Forbidden) is more accurate and avoids triggering server-error monitoring/clients treating it as a backend failure.
  if (settings.main.quickConnectOnly) {
    return res.status(500).json({
      error: 'Jellyfin login can only be used with Quick Connect enabled.',
    });
  }

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@Billos

Billos commented Jul 30, 2026

Copy link
Copy Markdown
Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated no new comments.

Suppressed comments (2)

server/routes/auth.ts:265

  • quickConnectOnly blocks POST /auth/jellyfin unconditionally, including during initial setup (mediaServerType === NOT_CONFIGURED). Quick Connect authentication is explicitly rejected during initial setup (/auth/jellyfin/quickconnect/authenticate returns 403 in that case), so a migrated/manual config with quickConnectOnly: true can lock the instance out of completing setup.
  if (settings.main.quickConnectOnly) {
    return res.status(403).json({
      error: 'Jellyfin login can only be used with Quick Connect.',
    });
  }

server/routes/auth.ts:265

  • The new Quick Connect-only enforcement on POST /auth/jellyfin is not covered by route tests. Since Quick Connect behavior is already tested in server/routes/auth.test.ts, add tests for the password-login route to ensure it returns 403 when main.quickConnectOnly is enabled (and still allows setup when mediaServerType === NOT_CONFIGURED).
  if (settings.main.quickConnectOnly) {
    return res.status(403).json({
      error: 'Jellyfin login can only be used with Quick Connect.',
    });
  }

Copilot AI review requested due to automatic review settings August 9, 2026 11:49
@Billos
Billos force-pushed the feat/only-quick-connect-option branch from 54d4b0c to 6cd87e3 Compare August 9, 2026 11:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated no new comments.

Suppressed comments (2)

src/components/Settings/SettingsUsers/index.tsx:133

  • quickConnectOnly is posted back even when the checkbox is hidden/irrelevant (e.g. media-server sign-in is off or the configured media server isn’t Jellyfin/Emby). That can persist inconsistent settings values and makes the server-side behavior depend on a hidden form field. Consider coercing it to false unless Jellyfin/Emby sign-in is enabled.
              await axios.post('/api/v1/settings/main', {
                localLogin: values.localLogin,
                mediaServerLogin: values.mediaServerLogin,
                quickConnectOnly: values.quickConnectOnly,
                newPlexLogin: values.newPlexLogin,

server/routes/auth.ts:265

  • This new Quick Connect-only rejection returns { error: ... }, but the Jellyfin login UI (and other callers) primarily key off response.data.message (e.g. ApiErrorCode.*). Returning a different error shape makes it harder to surface a meaningful message and is inconsistent with the rest of this route’s error handling. Consider using next({ status, message }) here as well.
  if (settings.main.quickConnectOnly) {
    return res.status(403).json({
      error: 'Jellyfin login can only be used with Quick Connect.',
    });
  }

Copilot AI review requested due to automatic review settings August 11, 2026 07:33
@Billos
Billos force-pushed the feat/only-quick-connect-option branch from 6cd87e3 to f91dcd9 Compare August 11, 2026 07:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated no new comments.

Suppressed comments (2)

server/routes/auth.ts:265

  • quickConnectOnly blocks POST /auth/jellyfin even during initial setup (mediaServerType === NOT_CONFIGURED). Quick Connect auth is explicitly unavailable during initial setup (see /jellyfin/quickconnect/authenticate), so if this flag is ever enabled via config/restore/API before configuration, the instance can get locked out of completing setup. Gate this restriction to configured instances only.
  if (settings.main.quickConnectOnly) {
    return res.status(403).json({
      error: 'Jellyfin login can only be used with Quick Connect.',
    });
  }

server/routes/auth.ts:265

  • The new quickConnectOnly behavior on POST /auth/jellyfin is currently untested. Since this file already has route tests (server/routes/auth.test.ts), add coverage to assert (1) a configured instance returns 403 when quickConnectOnly is enabled, and (2) initial setup (mediaServerType === NOT_CONFIGURED) is not blocked by the flag.

This issue also appears on line 261 of the same file.

  if (settings.main.quickConnectOnly) {
    return res.status(403).json({
      error: 'Jellyfin login can only be used with Quick Connect.',
    });
  }

Copilot AI review requested due to automatic review settings August 17, 2026 10:21
@Billos
Billos force-pushed the feat/only-quick-connect-option branch from f91dcd9 to f39df2d Compare August 17, 2026 10:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Suppressed comments (1)

server/routes/auth.ts:265

  • This new Quick Connect-only enforcement is not covered by existing auth route tests. Adding coverage would help prevent regressions (e.g., verify /auth/jellyfin returns 403 when quickConnectOnly is enabled for Jellyfin, and that Emby login is unaffected).
  if (settings.main.quickConnectOnly) {
    return res.status(403).json({
      error: 'Jellyfin login can only be used with Quick Connect.',
    });
  }

const intl = useIntl();
const settings = useSettings();
const [showQuickConnect, setShowQuickConnect] = useState(false);
const quickConnectOnly = settings.currentSettings.quickConnectOnly;
Comment on lines +84 to +86
const isJellyfin =
settings.currentSettings.mediaServerType === MediaServerType.JELLYFIN ||
settings.currentSettings.mediaServerType === MediaServerType.EMBY;
Comment thread server/routes/auth.ts
Comment on lines +261 to +265
if (settings.main.quickConnectOnly) {
return res.status(403).json({
error: 'Jellyfin login can only be used with Quick Connect.',
});
}
Copilot AI review requested due to automatic review settings August 26, 2026 10:48
@Billos
Billos force-pushed the feat/only-quick-connect-option branch from f39df2d to b49e465 Compare August 26, 2026 10:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Suppressed comments (2)

src/components/Settings/SettingsUsers/index.tsx:86

  • isJellyfin includes MediaServerType.EMBY, but the Quick Connect UI is only rendered for Jellyfin (JellyfinLogin shows the Quick Connect button only when serverType === JELLYFIN). Allowing this setting on Emby can hide the username/password form without providing Quick Connect, effectively blocking sign-in.
  const isJellyfin =
    settings.currentSettings.mediaServerType === MediaServerType.JELLYFIN ||
    settings.currentSettings.mediaServerType === MediaServerType.EMBY;

src/components/Login/JellyfinLogin.tsx:49

  • quickConnectOnly is applied unconditionally from global settings. If it ever ends up enabled while this component is used for Emby, it will hide the password form but the Quick Connect button is only rendered for Jellyfin (serverType === JELLYFIN), leaving no usable login path.
  const quickConnectOnly = settings.currentSettings.quickConnectOnly;

}
/>
);
setFieldValue('quickConnectOnly', false);
Comment thread server/routes/auth.ts
Comment on lines +261 to +265
if (settings.main.quickConnectOnly) {
return res.status(403).json({
error: 'Jellyfin login can only be used with Quick Connect.',
});
}
Comment thread server/routes/auth.ts
Comment on lines +261 to +265
if (settings.main.quickConnectOnly) {
return res.status(403).json({
error: 'Jellyfin login can only be used with Quick Connect.',
});
}
@Billos
Billos force-pushed the feat/only-quick-connect-option branch from b49e465 to 66aca33 Compare September 2, 2026 13:14
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.

Option to enforce Quick Connect and prevent username / pass login

3 participants