Skip to content

feat(create): support passwordless / SSO login profiles - #3493

Merged
dominikschulz merged 1 commit into
gopasspw:masterfrom
1995parham:feat/passwordless-sso-profiles
Sep 9, 2026
Merged

dominikschulz merged 1 commit into
gopasspw:masterfrom
1995parham:feat/passwordless-sso-profiles

Conversation

@1995parham

Copy link
Copy Markdown
Contributor

Summary

Adds a way to model accounts that have no stored password because login happens through an external provider (e.g. Google, Apple, SSO / social login).

The secret model already tolerates an empty password (first line), so this needs no changes to the Secret interface or the storage format — everything lives in the gopass create wizard.

Changes

  • New default "SSO / passwordless login" template (internal/create/templates.go). It shows up in gopass create and records the provider in a login-method field instead of prompting for a password:
    url: https://accounts.google.com
    username: user@example.com
    login-method: google
    
  • New choice attribute type (internal/create/wizard.go) so a template can offer a fixed list of options. The SSO template uses it for the provider picker (google, apple, github, microsoft, sso, magic-link). Backed by the existing cui.GetSelection helper.
  • Optional / skippable password: a password attribute marked optional: true asks "Does this account have a password?" and skips password entry entirely when declined (instead of storing a blank one). This lets a single template serve both password and passwordless accounts. Existing templates leave the flag unset, so their behaviour is unchanged.
  • Tests covering the new default template, the choice type, and the optional flag.

Notes

  • The SSO template is filed under the existing websites prefix (2-websites.yml), so there is no collision with the 0-websites.yml Website login template. Happy to move it under a dedicated prefix (e.g. sso/) if preferred.
  • gopass show already handles empty-password secrets gracefully (it only errors when both password and body are empty, and guards clipboard/QR on a non-empty password), so passwordless entries display and behave correctly.

@1995parham
1995parham force-pushed the feat/passwordless-sso-profiles branch from e0d4f7b to bb4fb91 Compare July 16, 2026 17:57
@dominikschulz
dominikschulz self-requested a review August 10, 2026 21:12
Add a way to model accounts that have no stored password because login
happens through an external provider (e.g. Google, Apple, SSO).

- New default "SSO / passwordless login" wizard template that records the
  provider in a `login-method` field instead of prompting for a password.
- New `choice` attribute type so templates can offer a fixed list of
  options (used for the login-method provider picker).
- Optional passwords: a `password` attribute marked `optional: true` lets
  the user skip password entry, so a single template can serve both
  password and passwordless accounts.

The secret model already tolerates an empty password, so no changes to the
Secret interface or storage format are required.

Signed-off-by: Parham Alvani <parham.alvani@gmail.com>
@1995parham
1995parham force-pushed the feat/passwordless-sso-profiles branch from bb4fb91 to f18564e Compare September 2, 2026 03:01
@dominikschulz

Copy link
Copy Markdown
Member

Sorry for the delay here. The idea sounds reasonable, I simply didn't get to look at the code, yet.

@dominikschulz
dominikschulz merged commit abf1160 into gopasspw:master Sep 9, 2026
9 checks passed
@1995parham
1995parham deleted the feat/passwordless-sso-profiles branch September 9, 2026 19:52
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.

2 participants

⌂ 换网址