Skip to content

Add device code authenticator#442

Open
meeuw wants to merge 1 commit intomguessan:masterfrom
meeuw:device-code-authenticator
Open

Add device code authenticator#442
meeuw wants to merge 1 commit intomguessan:masterfrom
meeuw:device-code-authenticator

Conversation

@meeuw
Copy link

@meeuw meeuw commented Feb 7, 2026

Device code authentication is a bit different from call back authentication as for device code authentication a (short) code has to be copied from davmail to the web browser.

The advantages of this are a slightly better user experience and some appid's don't allow/support call back authentication.

I think davmail could be refactored a bit to make these changes a bit more clean (make the call back url optional, make a resource a single definition, move json parsing)

Please let me know what you think of this.

mguessan added a commit that referenced this pull request Mar 1, 2026
mguessan added a commit that referenced this pull request Mar 1, 2026
@mguessan
Copy link
Owner

mguessan commented Mar 1, 2026

Thanks for your contribution, I refactored your code a bit to use RestRequest to handle JSON response.

Can you please confirm merged code is working as expected ?

@meeuw
Copy link
Author

meeuw commented Mar 3, 2026

Thanks! I tried davmail from master but it seems that no refresh_token is returned, I'm pretty sure the branch in this PR did this but I haven't actually checked if it's still the case.

@meeuw meeuw force-pushed the device-code-authenticator branch from fef9e23 to 781a209 Compare March 4, 2026 20:09
@meeuw
Copy link
Author

meeuw commented Mar 4, 2026

I got the master branch working! I had to configure davmail.enableOidc=false and now a refresh_token is returned.

I'm not sure if you intentionally left out the changes in 781a209, I updated this PR to include it.

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.

2 participants