Modern Authentication for Fastmail

I noticed in a post about OAuth2 in Outlook/Gmail, it seems like it was added to those providers. Is OAuth2 also a planned addition for Fastmail?

I understand if it is not planned. I also would be happy to learn from the Outlook/Gmail implementation to try to create a PR for it if it would be welcomed. Admittedly, I might be slow.

Not currently — Fastmail is still set up with an app password in the current release, and OAuth is only wired up for Google and Microsoft. It’s not on my near-term list, mostly because the app-password flow has been reliable and Fastmail’s OAuth program for third-party clients isn’t something I’ve gone through yet.

A PR would be welcome. The pieces you’d touch on the client side are in app/internal_packages/onboarding/: account-providers.tsx (the provider entry, currently pointing people at Fastmail’s app-password page) and onboarding-helpers.ts (the Gmail/Outlook token exchange and account building; the Outlook implementation from 1.14 is the more recent pattern to copy). In the sync engine, NetworkRequestUtils.cpp has the per-provider token refresh endpoints and XOAuth2TokenManager.cpp handles the XOAUTH2 SASL for IMAP/SMTP. The main thing to sort out up front is registering a client ID with Fastmail and how a desktop app should hold the client secret. Open a GitHub issue to discuss that before you sink time into it.