sync(chunk 2d): the account-add flow
One flow, one back-stack entry, as a stepper rather than four destinations —
the steps are not independently reachable, and "back" from the browser step
abandons a server-side flow rather than popping a screen. It hangs off Settings
with the same sliding-section pattern Storage -> Export uses.
address -> discovery -> (Nextcloud browser approval | username + password)
-> pick lists -> add account
Provider warnings come before the attempt, not after: type a Fastmail or iCloud
address and the app password rule is stated while you type, which is the single
most common support ticket a CalDAV client inherits. Google is refused with the
reason. A login-flow host mismatch is shown, not refused — reverse proxies are
ordinary on self-hosted installs.
PreemptiveBasicInterceptor is deleted. The vendored BasicDigestAuthHandler
already sends Basic preemptively over HTTPS, also does Digest (Baikal defaults
to it, OkHttp has none), caches the working scheme, and scopes by registrable
domain — which is what iCloud's cross-host home set needs. Two implementations
of one job is the defect chunk 1 removed from ICalendarWriter.
⚠️ That handler compares its `domain` against the *registrable* domain, so
passing the full host meant credentials were withheld from every request to
every subdomain — i.e. every self-hosted Nextcloud, silently 401ing forever.
Pinned by CalDavHttpTest.
CalDavGateway and AccountCreator put the network and the database behind
interfaces so the sign-in state machine is testable without a server, a
database, a Keystore or an AccountManager. It had no tests, and the review
found eight issues in it.
Account creation is transactional and rolls its lists back explicitly:
account_id is ON DELETE SET NULL, so deleting the row alone leaves orphan
lists behind and every retry adds another set.
This commit is contained in:
@@ -294,4 +294,40 @@
|
||||
<item quantity="one">%1$d week before</item>
|
||||
<item quantity="other">%1$d weeks before</item>
|
||||
</plurals>
|
||||
|
||||
<!-- CalDAV accounts -->
|
||||
<string name="settings_section_accounts">Accounts</string>
|
||||
<string name="settings_accounts_subtitle">Sync your tasks with a CalDAV server</string>
|
||||
<string name="accounts_empty_title">No accounts yet</string>
|
||||
<string name="accounts_empty_body">Add a CalDAV account and Agendula keeps your task lists in step with it — Nextcloud, Radicale, Baïkal and anything else that speaks the protocol.</string>
|
||||
<string name="accounts_add">Add an account</string>
|
||||
<string name="accounts_remove">Remove account</string>
|
||||
<string name="accounts_remove_confirm_title">Remove %1$s?</string>
|
||||
<string name="accounts_remove_confirm_body">Its task lists stay on this device and stop syncing. Nothing is deleted from the server.</string>
|
||||
<string name="accounts_remove_confirm_action">Remove</string>
|
||||
<string name="accounts_never_synced">Never synced</string>
|
||||
<string name="accounts_sync_failed">Last sync didn\u2019t finish</string>
|
||||
|
||||
<string name="add_account_title">Add an account</string>
|
||||
<string name="add_account_server_label">Email address or server address</string>
|
||||
<string name="add_account_server_hint">you@example.com, or https://cloud.example.com</string>
|
||||
<string name="add_account_continue">Continue</string>
|
||||
<string name="add_account_start_over">Start over</string>
|
||||
|
||||
<string name="add_account_username_label">User name</string>
|
||||
<string name="add_account_password_label">Password</string>
|
||||
<string name="add_account_password_hint">Use an app password if your server offers one — it can be revoked without changing your account password.</string>
|
||||
<string name="add_account_sign_in">Sign in</string>
|
||||
|
||||
<string name="add_account_browser_title">Waiting for your browser</string>
|
||||
<string name="add_account_browser_body">Approve Agendula in the browser, then come back here. Your password is never sent to this app — the server issues a separate app password you can revoke at any time.</string>
|
||||
<string name="add_account_browser_reopen">Open the browser again</string>
|
||||
<string name="add_account_browser_use_password">Use a password instead</string>
|
||||
<string name="add_account_browser_host_mismatch">The server sent us to %1$s, but you typed %2$s. That usually means its overwrite.cli.url setting is wrong.</string>
|
||||
|
||||
<string name="add_account_lists_title">Which lists should sync?</string>
|
||||
<string name="add_account_lists_read_only">Read-only</string>
|
||||
<string name="add_account_lists_shared">Shared with you</string>
|
||||
<string name="add_account_save">Add account</string>
|
||||
<string name="add_account_no_lists_selected">Pick at least one list</string>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user