Skip to content

Introspect OIDC token to fix automatic Thundermail CalDAV connection - #1758

Open
davinotdavid wants to merge 1 commit into
mainfrom
davinotdavid/fix-ftue-automagic-thundermail-dev
Open

Introspect OIDC token to fix automatic Thundermail CalDAV connection#1758
davinotdavid wants to merge 1 commit into
mainfrom
davinotdavid/fix-ftue-automagic-thundermail-dev

Conversation

@davinotdavid

Copy link
Copy Markdown
Contributor

What changed?

During the automatic Thundermail CalDAV connection, instead of using Subscriber.email for the auth, we are introspecting the OIDC token and using a fallback of preferred_username -> username -> Subscriber.email.

Why?

We shouldn't rely on Subscriber.email to 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-accounts and appointment in your local dev environment and change the .env vars from appointment to point to thunderbird-accounts ports. Also don't forget to change the AUTH_SCHEME to oidc.

  1. Navigate to `http://localhost:8090
  2. Sign up with admin@example.org / admin (if this works, you have successfully setup both projects together)
  3. In the FTUE, click on "Connect Thundermail Calendar" and click Continue
  4. Check that there shouldn't be any errors

Applicable Issues

Closes #1757
Related with #1689

@devmount devmount left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 😇

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.

In FTUE, Thundermail CalDAV auto-connect should use preferred_username

2 participants