Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

accounts: add auth attrset in order to add more auth methods in the future #6437

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

blaggacao
Copy link
Contributor

@blaggacao blaggacao commented Feb 12, 2025

Description

This PR should lay the foundation for adding new auth mechanisms (such as Gmail OAuth) in the module's current shapeliness (i.e. without adding arbitrary auth-related attributes to the top-level namespace).

This shapeliness will make it obvious and (once the necessary migration of current modules is accomplished) cheaper to implement new auth mechanisms on the generic accounts interface.

It appears that previous efforts were frustrated by overwhelming complexity. This PR tries to split up the problem into smaller chunks, and specifically ensure migration of existing modules is completed by the time it can be undrafted.

Ref: #4219 & #4988

Checklist

  • Change is backwards compatible.

  • Code formatted with ./format.

  • Code tested through nix-shell --pure tests -A run.all
    or nix build --reference-lock-file flake.lock ./tests#test-all using Flakes.

  • Test cases updated/added. See example.

  • Commit messages are formatted like

    {component}: {description}
    
    {long description}
    

    See CONTRIBUTING for more information and recent commit messages for examples.

  • If this PR adds a new module

    • Added myself as module maintainer. See example.

Maintainer CC

@blaggacao
Copy link
Contributor Author

@rycee I already got some of the necessary refactorings done locally. But before I charge on and involve the maintainers of aerc, neomutt and the likes to help review them: do you agree with this approach in principle?

@blaggacao blaggacao force-pushed the accounts-auth branch 7 times, most recently from 513437f to cb16be7 Compare February 12, 2025 18:55
@github-actions github-actions bot added the mail label Feb 12, 2025
@blaggacao blaggacao force-pushed the accounts-auth branch 3 times, most recently from 548a286 to 4f172ad Compare February 13, 2025 08:08
@blaggacao blaggacao force-pushed the accounts-auth branch 2 times, most recently from 7df2c2f to f3541ce Compare February 13, 2025 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant