Thank you @nephros for your warning. I totally agree with it and the advice to migrate away. I understand that it’s still an issue to have an email address that is not long-term valid. It requires to warn many people, like when changing phone number or bank account.
Coming back to the authentication point, currently the email application can do OAuth2 only with Google as far as I know, and it relies on several proprietary pieces of software in Sailfish OS. In my opinion, it could be good to change this matter of fact and work on having OAuth2 authentication working for any provider (Microsoft is using it by the way, for how long, I don’t know though).
Doing OAuth2 from the email application is quite simple, it requires to get the access token
and send it as a challenge duting the authentication. There is no code for IMAP, POP and SMTP at the moment, and it’s handled in qmf-oauth2-plugin
which is closed sources. But I’m working on a rewrite of this authentication part in QMF and I’m adding the access token
stuff in the open source part, see https://codereview.qt-project.org/c/qt-labs/messagingframework/+/573489.
Then, the access token
is stored by Signgle Sign On (SSO). It’s handled by the OAuth2 plugin to SSO which is opensource, see GitHub - sailfishos/signon-plugin-oauth2
Then, the largest part of the stack, is how to retrieve this access token
. It is done in the setting application, so completely closed source. It means first to register once and for all for a client id
. Jolla has done it for Google. It must be done for every provider. Especially, they must do it for Microsoft if desired. With this client id
during account creation on device, the setting application must submit for an access token
providing the client id
and its associated secret. This is done in a HTML page where the user grant permission to the Jolla application to access his / her emails. Then, the page return the access token
and a refresh token
that can be stored in SSO, with additional information on how to use the refresh token
. There is a dedicated QML page for Google at the moment in the application. It can be duplicated for Microsoft I guess. But it’s not very future proof and scalable for other providers. I don’t want to have a dedicated page for every providers. Another possibility would be to write a small application presenting the HTML page and saving the tokens in SSO. Later on, Jolla may be interested in moving this to the setting application.
To summarize, I don’t have a plan and it won’t be ready in the immediate future.