Implement FR #2693: Implement OAuth2 Device Authorisation Flow (#3313)

Adds support for Microsoft’s OAuth2 Device Authorisation Flow, enabling the client to authenticate using device and user codes on a second device. This is particularly useful for headless or limited-input environments where interactive browser login is not possible.

Includes:
- Initiating device code requests and displaying user instructions
- Polling token endpoint until user authorises the device or the code expires
- Error handling for pending, declined, and expired authorisation states
- Countdown display showing remaining authorisation window

This feature is enabled via the `use_device_auth` config option
This commit is contained in:
abraunegg 2025-06-03 07:47:56 +10:00 committed by GitHub
commit 810197cc05
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 366 additions and 126 deletions

3
config
View file

@ -178,6 +178,9 @@
## Only upload changes to OneDrive, do not download from cloud.
#upload_only = "false"
## Authenticate using the Microsoft OAuth2 Device Authorisation Flow
#use_device_auth = "true"
## Single Sign-On (SSO) via Intune using the Microsoft Identity Device Broker
#use_intune_sso = "true"