UX: "Change password" silently fails for Google/GitHub SSO-only accounts
Summary
For accounts created exclusively via Google or GitHub SSO (no email+password identity), the Settings → Change password form accepts input and shows no error, but the password is never activated for direct email+password login. The user has no indication that the operation did nothing useful.
Steps to reproduce
- Create a huly.app account using Sign in with Google (never set a password)
- Go to Settings → Change password
- Leave "Current password" blank, enter a new password twice, click Save
- Try to sign in at huly.app with your email + that password
- Login fails silently (API returns
platform:status:AccountNotFound)
Expected behaviour
One of:
- Option A: The form succeeds and actually enables email+password login for the account (links the email identity with a password).
- Option B: The form shows a clear message: "Your account uses Google login. To set a password, you must first verify your email via a one-time code." and redirects to the OTP flow.
Actual behaviour
- The form accepts the input with no error
- Email+password login still fails with
AccountNotFound - The only working login path for SSO users is the OTP flow (
loginOtp→validateOtp), but there is no UI hint pointing to this
Impact
- Confusing for developers and power users trying to use API/CLI tooling (e.g. MCP servers, import scripts) that authenticate with email+password
- No error feedback means users waste time debugging what appears to be a valid credential
Environment
- huly.app (cloud)
- Account type: Google SSO only
- Observed via the
@hcengineering/account-clientSDK (login(email, password)returnsAccountNotFound)
Connected to Huly®: UBERF-15858
Root cause analysis
Traced the flow through the code:
Backend (server/account/src/operations.ts:1313-1346):
changePassword requires both oldPassword and newPassword to be non-empty. For SSO-only accounts (hash == null, salt == null), verifyPassword() always returns false — so even if a user guesses they should enter something, the backend rejects it with Forbidden.
Frontend (plugins/setting-resources/src/components/Password.svelte):
The save button is disabled until oldPassword.length > 0 (line 33), so SSO users can never submit. No indication is shown that the form is unusable for their account type.
Proposed fix
Option B (from the issue) is the right call — showing a clear message rather than silently enabling password-based login (which has security implications for SSO-managed accounts).
Implementation would be:
- Backend: Add
hasPassword: booleanto the response of an existing account endpoint (e.g.getLoginInfoByToken) — derived fromaccount.hash != null - Frontend:
Password.sveltecheckshasPasswordon mount:- If
true: show the existing change-password form (current behavior) - If
false: show a message explaining the account uses SSO login, with a link to the OTP flow if they want to set a password
- If
Happy to submit a PR if the maintainers confirm the approach.
UX Research: How major apps handle this
I surveyed how GitHub, Slack, GitLab, Atlassian, Figma, Linear, Notion, and Firebase handle the "change password" flow for SSO-only accounts. Three distinct patterns emerged:
Pattern 1: "Managed by [Provider]" — Hide the form entirely
Used by: Figma, GitLab
The password section in account settings shows a label like "Managed by Google" and disables/hides the password fields entirely. Users understand immediately that their identity provider controls their credentials.
- Figma: Settings page shows "Managed by Google" — no password fields visible. To add a password, users go through the "Reset password" flow from the login page (email verification → set new password). This effectively converts the account to support both SSO and email+password.
- GitLab: SSO accounts get an auto-generated random password. Admins can disable password auth entirely for SSO users. The password form is hidden when password auth is disabled.
Pattern 2: "Set a password" — Show a different form
Used by: Firebase (account linking pattern)
Instead of "Change password" (which implies one exists), show a "Set a password" or "Add password login" form that only requires the new password (no "current password" field). Usually gated behind email verification (OTP/magic link) to prove account ownership.
Pattern 3: Redirect to IdP — Don't handle it at all
Used by: Slack, Atlassian/Jira, Linear
Password management is fully delegated to the identity provider. The settings page either has no password section, or shows a message like "Password managed by your organization" with a link to the IdP's password change page.
- Slack: SSO-only members don't have Slack passwords. To set one (e.g. before removing SSO), they must go through a separate flow.
- Atlassian: Google SSO users hit a dead end trying to change passwords. Community threads show confusion — the answer is "change it in Google Workspace."
UX consensus
| Approach | Pros | Cons | Best for |
|---|---|---|---|
| Hide + "Managed by" | Clearest UX, no confusion | Users can't add password login | Strict SSO environments |
| "Set a password" form | Enables multi-method auth | Needs email verification step | Self-hosted / developer tools |
| Redirect to IdP | Zero implementation | Confusing when IdP doesn't manage Huly passwords | Enterprise SAML only |
Recommendation for Huly
Pattern 2 ("Set a password") is the best fit for Huly because:
- Huly supports mixed auth (SSO + email+password) — it's not a strict SSO environment
- API tokens and CLI tools benefit from having email+password as a fallback auth method
- Self-hosted users especially need this flexibility
Proposed UX flow:
Password.sveltecheckshasPassword(new field from account info)- If
hasPassword === true: Show current "Change password" form (no change) - If
hasPassword === false: Show a simplified form:- Header: "Set a password" (not "Change password")
- Explanation: "Your account uses [Google/GitHub/OIDC] login. Set a password to also enable email + password sign-in."
- Fields: New password + Confirm password only (no "current password")
- Backend: verify account ownership via existing session token (user is already authenticated via SSO), then call
setPassword()directly
This matches what Figma does but with a smoother in-app flow (no need to log out and use "Reset password" from the login page).
Thanks for the thorough root cause analysis and the UX survey — really appreciate the legwork!
Pattern 2 ("Set a password") is the right call for Huly. The mixed-auth nature of the platform (SSO + email+password coexisting) and the API/CLI use-case make it important that SSO users can opt into email+password without leaving the app.
The proposed implementation looks solid:
hasPassword: booleanfrom account info to gate the UI- Show "Set a password" form (no "current password" field) when
hasPassword === false - Verify ownership via the existing session token (user is already authenticated), then call
setPassword()directly
Please go ahead and open the PR — happy to review and test.
@dnplkndll Please, no. Just show right message and link to reset password
@BykhovDenis you don't think the account with only SSO should be allowed to set a password? Or what approach are you thinking? the linked PR is complete. Just does not ask for a password that does not exists and allows setting the New Password.
I am not super familiar with the code base. Just trying to clean up issues while I have some free time!
@dnplkndll Thanks for the contribution! My main concern is security. If the system is left logged in, someone could set a password without any confirmation or notification and then use it later.
Huly already allows setting a password via the password recovery link (https://huly.app/login/password), which I think is the safer and more appropriate flow.
Maybe instead of setting the password directly here, we could add a button that sends the recovery link to the user.
I had to research a little if that would be able to work with all SSO providers since you do not always have an email? will try to add a confirm like on register.
As of the current develop branch, SSO-only accounts no longer get the silent "Change password" form: Settings > Password now shows "Set a password" with an explanation and a "Send setup link" button that emails a confirmation link to set a password (or a hint if no email is linked). This was implemented in #10649, following the email-confirmed approach discussed above. @ArtyomSavchenko could you close this issue if you agree?
@varaprasadreddy9676 — based on the check described above, this looks resolved in the current code. Could you please close this issue if you agree? If you think it is not fixed yet, please describe what still goes wrong (steps, expected vs. actual behaviour), so it can be looked at again.