[Users] Outlook OAuth2 login has hard-coded wrong parameters
Federico Simonetta
federicosimonetta at zoho.com
Thu Oct 3 14:58:22 UTC 2024
Hello,
I spent a few hours trying to make Outlook OAuth2 working in Claws Mail.
The main issue is that Claws Mail interacts with the remote end point by using http://127.0.0.1:8888.
Unfortunately, Microsoft consider this url a different parameter than http://localhost:8888.
Since in Microsoft's system the `redirect_url` parameter is used to determine the OAuth2 workflow, they don't know which workflow to use if the `redirect_url` is different from the one set in remote application.
At the same time, they allow using htttp:// for redirection targets only if it starts with `http://localhost`.
So, the two things combined, makes it impossible to login with Claws Mail.
I retried the whole Claws Mail requests just using `http://localhost:8888` and I was able to login and download my emails.
Unfortunately, this parameter is hard-coded (https://git.claws-mail.org/?p=claws.git;a=blob_plain;f=src/oauth2.c;hb=87726652461a966c766a179863229620b21bc36d)
As a side point, other users here and in other forums are wondering how to create the application with a free account since a popup says you should login.
Well, it do is possible:
1. go to https://portal.azure.com/#view/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/~/RegisteredApps (same url in the wiki)
2. just click "ignore" on the popup and it will disappear for a few seconds
3. if the popup reappears, click on "ignore" again and proceed
4. in those seconds you should click on "Overview" (left bar), then "+ Add" (top menu), then "Add registration"
5. the popup won't appear anymore
It's not obvious but it's still possible :)
More information about the Users
mailing list