Skip to content

feature(signup): migrate simple-signup to standard browser#9969

Merged
mgallien merged 8 commits into
masterfrom
codex/add-nc-account-setup
Jul 6, 2026
Merged

feature(signup): migrate simple-signup to standard browser#9969
mgallien merged 8 commits into
masterfrom
codex/add-nc-account-setup

Conversation

@Rello

@Rello Rello commented May 5, 2026

Copy link
Copy Markdown
Collaborator

Background

  • The existing Simple-Signup-Process relied on the internal QTWebEngine. This is not available as of macOS sandboxing anymore.
  • Additionally, the QTWebEngine accounted for 50% of the whole desktop client (download & install size)

Overview

  • The Simple-Signup-Process now opens nextcloud.com with the default browser and adds a flow=V3 url parameter
  • This parameter is forwarded from the website (nextcloud-register) to the website backend (nextcloud-theme) and then to the Nextcloud of the provider (prefered_providers)
  • The existing flow based on ocsapirequest (old desktop clients & mobile clients) is not touched. In this case, the Nextcloud will return a nc://login/server:{server}&user:{email}&password:{appPassword} response
  • When a request arrives with flow=V3, the user is logged in in the webUI and additionally, a nc://login/server:{server} response is triggered
  • This response will trigger the existing V2 flow in the client and jump to the "grant access" section right away, without the user needing to perform any additional action

Changes to desktop

  • Added a central nc:// URI dispatcher for routing supported actions.
  • Kept existing local edit handling under nc://open/....
  • Added quick login handling for nc://login/server:{server}
  • The login URI now starts the Flow v2 account login directly with the supplied server URL.
  • Added validation for malformed or unsupported URI actions so they are rejected before falling through to local-edit handling.
  • Added parser coverage for valid login URLs, invalid login URLs, local-edit URLs, and unsupported actions.
  • Added macOS URI dispatch logging to make it visible when an nc:// URL reaches the client.
  • Updated the setup wizard so an incoming login URI restarts an already-open wizard into the Flow v2 login page instead of only raising the existing window.
  • Fixed the provider signup waiting page text so the status text wraps within the available window width.

This pull request depends on the following pull requests to be merged first:

@Rello

Rello commented May 8, 2026

Copy link
Copy Markdown
Collaborator Author
Bildschirmaufnahme.2026-05-08.um.13.41.36.mov

Note:
The part where the url is copied an only be performed when the PRs for the website are live, so this is simulated here

@jospoortvliet

Copy link
Copy Markdown
Member

looking at the video - this flow seems reasonable, yeah, it works for me. It's a little more involved, but if it makes things so much easier it is worth it. @jancborchardt agreed?

@jancborchardt jancborchardt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sure, yeah this seems fine considering the dev effort this saves also.

A nice enhancement would be to open the simple signup page with a parameter that loads only the essentials there to make it super quick and not seem bloated. For example:

  • No navigation, no footer (to not navigate away)
  • No animation for the right block – currently that slows stuff down
  • Focus "Your email address" field

@Rello Rello marked this pull request as ready for review May 20, 2026 04:56

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 618a6c5a35

ℹ️ 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".

Comment thread src/gui/cocoainitializer_mac.mm
Comment thread src/gui/urischemehandler.cpp
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
27.1% Coverage on New Code (required ≥ 80%)
B Maintainability Rating on New Code (required ≥ A)
1 New Bugs (required ≤ 0)
61 New Code Smells (required ≤ 0)
D Security Rating on New Code (required ≥ A)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@i2h3 i2h3 added os: 🍎 macOS Apple macOS, formerly also known as OS X os: 🚪 Windows os: 🐧 Linux feature: ☁️ GUI System tray icon and menu. labels May 20, 2026
@github-project-automation github-project-automation Bot moved this to 🧭 Planning evaluation (don't pick) in 💻 Desktop Clients team May 20, 2026
@i2h3 i2h3 moved this from 🧭 Planning evaluation (don't pick) to 🏗️ In progress in 💻 Desktop Clients team May 20, 2026
@Rello

Rello commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator Author

@copilot resolve the merge conflicts in this pull request

Copilot AI commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Merge conflicts resolved in commit fix: resolve merge conflicts with master QML wizard migration.

The main conflicts arose from master's migration from the QWizard-based wizard to the new QML wizard (AccountWizardController). Here's what was done:

  • Deleted old wizard files that master removed: owncloudwizard.cpp/h, owncloudwizardcommon.h, webviewpage.cpp, welcomepage.cpp
  • Ported runWizardForLoginFlow to work with the new QML wizard by setting the server URL on AccountWizardController and calling submitServerUrl() — this preserves the nc://login/server:{url} handling
  • Updated openSignup() URL to include the ?flow=V3 parameter
  • Fixed application.cpp to use master's parseOptionsRemoteCommand() while keeping handleUriFromOptions() for the full nc:// URI dispatch
  • Fixed flow2auth.cpp poll interval constant naming to align with master

Copilot finished work on behalf of Rello July 2, 2026 12:06
@Rello

Rello commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator Author

testing URL for the new nc:// shortcut e.g.

nc://login/server:http%3A%2F%2Flocalhost%3A8034

Add NC URI handling for account setup and provider signup flow support.

Signed-off-by: Rello <github@scherello.de>
@Rello Rello force-pushed the codex/add-nc-account-setup branch from 1f9aea1 to 13c8302 Compare July 2, 2026 19:11
chatgpt-codex-connector[bot]

This comment was marked as outdated.

Signed-off-by: Rello <github@scherello.de>
chatgpt-codex-connector[bot]

This comment was marked as outdated.

Signed-off-by: Rello <github@scherello.de>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 33a2327054

ℹ️ 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".

Comment thread src/gui/owncloudsetupwizard.cpp Outdated
Signed-off-by: Rello <github@scherello.de>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1ce817cebb

ℹ️ 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".

Comment thread src/gui/application.cpp
_gui->createTray();

handleEditLocallyFromOptions();
handleUriFromOptions();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Suppress the startup wizard after login URIs

When the app is cold-started with an nc://login URI and no accounts, this call starts the login-flow wizard before the queued initial slotCheckConnection from Application::Application runs. That later check still sees an empty account list, calls slotOpenSettingsDialog(), and slotNewAccountWizard() uses forceRestart=true, so it rejects the URI login wizard and replaces it with the normal setup wizard before the Flow v2 auth can complete; skip or stop that initial empty-account check after handling a login URI.

Useful? React with 👍 / 👎.

@mgallien mgallien left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

one small request for change

Comment thread src/gui/creds/flow2auth.cpp Outdated
@Rello Rello moved this from 🏗️ In progress to 🏁 NC34 in 💻 Desktop Clients team Jul 6, 2026
Signed-off-by: Rello <github@scherello.de>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 866749ab28

ℹ️ 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".

Comment thread src/gui/application.cpp Outdated
Signed-off-by: Rello <github@scherello.de>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 58406923b3

ℹ️ 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".

void AccountWizardController::openSignup()
{
Utility::openBrowser(QUrl(QStringLiteral("https://nextcloud.com/register")));
Utility::openBrowser(QUrl(QStringLiteral("https://nextcloud.com/sign-up/?flow=V3")));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Register nc:// handler before external signup

On Linux AppImage first-run/no-account installs, this new flow=V3 signup path depends on the browser being able to call back via nc://login, but the only runtime registration I found is Utility::registerUriHandlerForLocalEditing() from FolderMan::setupFolders(), and Application::setupAccountsAndFolders() returns before setupFolders() when no accounts exist. In that context clicking Sign up can complete in the browser without any x-scheme-handler/nc association, so the login callback never reaches the client; register the handler during no-account startup or before opening this URL.

Useful? React with 👍 / 👎.

@mgallien mgallien left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

a minor comment and it should be good to go

Comment thread src/gui/wizard/accountwizardcontroller.cpp Outdated
Rello and others added 2 commits July 6, 2026 15:09
Co-authored-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
Signed-off-by: Rello <Rello@users.noreply.github.com>
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Artifact containing the AppImage: nextcloud-appimage-pr-9969.zip

Digest: sha256:d20ff0e8819dbbfb0a055fad45578cadee28674c971aab9901eebb58f72be077

To test this change/fix you can download the above artifact file, unzip it, and run it.

Please make sure to quit your existing Nextcloud app and backup your data.

@sonarqubecloud

sonarqubecloud Bot commented Jul 6, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot
29.9% Coverage on New Code (required ≥ 80%)
8.5% Duplication on New Code (required ≤ 3%)
D Security Rating on New Code (required ≥ A)
C Maintainability Rating on New Code (required ≥ A)
1 New Bugs (required ≤ 0)
C Reliability Rating on New Code (required ≥ A)
163 New Code Smells (required ≤ 0)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@mgallien mgallien left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

works on linux and windows

@mgallien

mgallien commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

/backport to stable-34.0 please

@mgallien mgallien merged commit 17f84a0 into master Jul 6, 2026
21 of 23 checks passed
@mgallien mgallien deleted the codex/add-nc-account-setup branch July 6, 2026 16:35
@github-project-automation github-project-automation Bot moved this from 🏁 NC34 to ☑️ Done in 💻 Desktop Clients team Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: ☁️ GUI System tray icon and menu. os: 🍎 macOS Apple macOS, formerly also known as OS X os: 🚪 Windows os: 🐧 Linux

Projects

Status: ☑️ Done

Development

Successfully merging this pull request may close these issues.

6 participants