You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Honour the self-signed setting when signing in to the CLI with a password #2082
Goal: Let appwrite login sign in with email and password to a self-hosted instance that uses a self-signed certificate, and keep the new session trusting that certificate for later commands.
templates/cli/internal/cmd/login.go: loginWithPassword now builds its client with SetSelfSigned(selfSigned), so the POST /account/sessions/email call, the MFA challenge and the /account lookup all accept the certificate. Before, only the /health/version endpoint check used the stored selfSigned preference, so sign-in failed with x509: certificate signed by unknown authority.
The new session is written with selfSigned: true when the setting is on, so later commands and token refresh pick it up.
New login --self-signed true|false flag (same string form as client --self-signed) that overrides the stored preference; rejected with --switch and against Cloud, like --password, --mfa and --code.
templates/cli/internal/cmd/login_test.go: regression tests against httptest.NewTLSServer for the stored preference, the flag without a prior client call, --self-signed false overriding a stored true, MFA over a self-signed certificate, invalid values, and rejection with Cloud and --switch.
Remaining steps: None beyond the linked PR; it is the full change. The fix reaches users with the next CLI release.
Activity