1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-10 02:51:05 +01:00

aerc-accounts: improve logic for parsing XOAUTH2 URL params (#6530)

This commit fixes an issue in aerc-accounts that prevents oauth2
accounts from being generated from given parameters. It also allows
users to add XOAUTH2 credentials without having to add all four of
client_id, client_secret, token_endpoint, and scope. It further adds
tests for the XOAUTH2 config generation.
This commit is contained in:
eulalia 2025-02-26 08:59:40 -05:00 committed by GitHub
parent 74f0a8546e
commit 18e74c2e02
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 52 additions and 2 deletions

View file

@ -134,8 +134,9 @@ in {
oauthParams = { auth, params }:
if useOauth auth && params != null && params != { } then
"?" + builtins.concatStringsSep "&" lib.attrsets.mapAttrsToList
(k: v: k + "=" + lib.strings.escapeURL v) params
"?" + builtins.concatStringsSep "&"
(lib.attrsets.mapAttrsToList (k: v: k + "=" + lib.strings.escapeURL v)
(lib.attrsets.filterAttrs (k: v: v != null) params))
else
"";