Skip to content

feat: improve provider config discovery and add custom credentials doc - #13

Open
woakin wants to merge 1 commit into
cosmic-utils:mainfrom
woakin:feat/provider-config-discovery
Open

feat: improve provider config discovery and add custom credentials doc#13
woakin wants to merge 1 commit into
cosmic-utils:mainfrom
woakin:feat/provider-config-discovery

Conversation

@woakin

@woakin woakin commented Mar 3, 2026

Copy link
Copy Markdown

This PR improves the provider configuration discovery mechanism and adds documentation for setting up custom OAuth credentials.

Changes:

  • accounts-daemon/src/auth.rs: Implemented a more robust configuration loading order:
    1. User config: ~/.config/cosmic/accounts/providers/
    2. System config: /etc/cosmic/accounts/providers/
    3. System data: /usr/share/cosmic/accounts/providers/
    4. Built-in/Dev path: accounts-daemon/data/providers/
  • accounts-daemon/src/auth.rs: Added support for overriding client_id and client_secret via environment variables (COSMIC_ACCOUNTS_GOOGLE_CLIENT_ID, etc.).
  • docs/EXTERNAL_PROVIDERS.md: New guide for users and testers on how to create their own OAuth applications and configure them.
  • justfile: Updated install-configs and uninstall paths to match the new /etc/cosmic/accounts/providers/ directory for consistency with other COSMIC components.
  • README.md: Added a reference to the new documentation.

Verified that the daemon correctly loads configurations from the new paths and that the services (Email, Calendar) initialize properly.

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.

1 participant