-
Bug
-
Resolution: Fixed
-
Major
-
3.11
-
MOODLE_311_STABLE
-
MOODLE_311_STABLE
-
MDL-71612-master -
This is a regression caused by MDL-71017, which peterdias just discovered while working on a dropbox service (API update). Good pickup, Pete!
Basically, after 71017 landed, we now have a select menu and can pick the "usage" type for the service. Selecting "Internal services only" removes form elements from the service configuration form. Removal of the "Additional parameters included in a login request for offline access" field from the form is not ideal, since this contains params needed to request refresh tokens to facilitate persistent sessions in various repositories (Nextcloud, Google to name a few). Why this was removed, I don't know.
We need to be able to set these params (or in the case of Google, allow the defaults to be used and saved) for services marked "Internal services only", so that refresh tokens can be requested and returned when users log in to their repository instances (Google Drive for example). Then, the refresh tokens can be subsequently exchanged for new access tokens allowing seamless access across Moodle sessions (until revoked by the user). This worked fine in 3.10
To replicate:
- Set up Google as a new OAuth2 client, with "This service will be used" set to "Internal Services Only".
- Set up Google Drive repo - linking to the service you just created.
- Go to private files, and log into the Google Drive repo
- Log out of Moodle
- Log back in to Moodle
- Go to private files > Google Drive Repo
Actual: Notice you need to log in again
Expected: You are logged in automatically
Marking as must fix