qfieldsync icon indicating copy to clipboard operation
qfieldsync copied to clipboard

[WIP] External auth providers implementation

Open gounux opened this issue 7 months ago • 0 comments

This PR intends to add Single Sign-On login capabilities to QFieldSync.

Current status is WIP.

Requirements

UI changes

This is a first draft here, nothing is fixed in stone, very open to discussion and propositions.

  • on first login, the dialog only displays the server URL:

image

  • when updating the server URL, the auth methods are fetched from the targeted QFieldCloud server (/api/v1/auth/providers/ endpoint), and the UI is adapted accordingly :

image

Google / Keycloak / OAuth2 methods are dynamically created.

  • clicking on Google or OpenID creates and stores a new QgsAuthMethodConfig, that should be used later on when sending some QNetworkRequest to the QFieldCloud server, using the QtNetwork framework. So we rely on QGIS's QgsAuthManager singleton instance to update all requests to QFieldCloud, using the customized OAuth2 config.

gounux avatar Mar 25 '25 11:03 gounux