Introspect OIDC token to fix automatic Thundermail CalDAV connection - #1758
Open
davinotdavid wants to merge 1 commit into
Open
Introspect OIDC token to fix automatic Thundermail CalDAV connection#1758davinotdavid wants to merge 1 commit into
davinotdavid wants to merge 1 commit into
Conversation
devmount
approved these changes
Jul 23, 2026
devmount
left a comment
Collaborator
There was a problem hiding this comment.
Code lgtm, tests are passing (in CI and locally for me too), CalDAV still works as expected when navigating the frontend.
I wasn't able to go through the tests steps though, since I don't have a working tb-accounts instance running locally 😇
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed?
During the automatic Thundermail CalDAV connection, instead of using
Subscriber.emailfor the auth, we are introspecting the OIDC token and using a fallback ofpreferred_username->username->Subscriber.email.Why?
We shouldn't rely on
Subscriber.emailto attempt to connect with the Thundermail CalDAV. The credentials should be derived / introspected from the OIDC token instead.How to test
This might be a bit troublesome to test but you'd need to run both
thunderbird-accountsandappointmentin your local dev environment and change the.envvars fromappointmentto point tothunderbird-accountsports. Also don't forget to change theAUTH_SCHEMEtooidc.admin@example.org / admin(if this works, you have successfully setup both projects together)Applicable Issues
Closes #1757
Related with #1689