Privacy settings relay auth toggle writes to the wrong field #239

Closed
opened 2026-04-18 16:18:41 +00:00 by Shreyas2004wagh · 1 comment
Contributor

Summary

The "Authenticate with unknown relays?" toggle in Privacy Settings appears to be wired to auth_mode, but the actual persisted settings field is relay_auth.

As a result, changing this toggle does not update the real relay auth setting, and saving can write an extra unused field into the settings payload.

Steps to reproduce

  1. Open Settings -> Privacy
  2. Toggle "Authenticate with unknown relays?"
  3. Save settings
  4. Re-open the page or inspect the settings object being saved

Actual behavior

  • The UI reads and writes settings.auth_mode
  • The real settings schema uses relay_auth
  • Saving publishes the full settings object, so the real relay_auth value is not updated by this toggle
  • An inert auth_mode field can be persisted alongside the real settings data

Expected behavior

  • The toggle should read from and write to relay_auth
  • Saving privacy settings should update the actual relay authentication mode used by the app

Likely cause

In src/routes/settings/privacy/+page.svelte, the toggle handler and checked state use settings.auth_mode, while the canonical settings type in src/app/core/state.ts defines the field as relay_auth.

Affected files

  • src/routes/settings/privacy/+page.svelte
  • src/app/core/state.ts

Notes

This looks like a small, self-contained bug and should be straightforward to fix.

## Summary The "Authenticate with unknown relays?" toggle in Privacy Settings appears to be wired to `auth_mode`, but the actual persisted settings field is `relay_auth`. As a result, changing this toggle does not update the real relay auth setting, and saving can write an extra unused field into the settings payload. ## Steps to reproduce 1. Open Settings -> Privacy 2. Toggle "Authenticate with unknown relays?" 3. Save settings 4. Re-open the page or inspect the settings object being saved ## Actual behavior - The UI reads and writes `settings.auth_mode` - The real settings schema uses `relay_auth` - Saving publishes the full settings object, so the real `relay_auth` value is not updated by this toggle - An inert `auth_mode` field can be persisted alongside the real settings data ## Expected behavior - The toggle should read from and write to `relay_auth` - Saving privacy settings should update the actual relay authentication mode used by the app ## Likely cause In `src/routes/settings/privacy/+page.svelte`, the toggle handler and checked state use `settings.auth_mode`, while the canonical settings type in `src/app/core/state.ts` defines the field as `relay_auth`. ## Affected files - `src/routes/settings/privacy/+page.svelte` - `src/app/core/state.ts` ## Notes This looks like a small, self-contained bug and should be straightforward to fix.
Author
Contributor

Closing this as a duplicate of #237.

Closing this as a duplicate of #237.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: coracle/flotilla#239