Oauth2 file share authorization

Hi,

In our organization all our users and groups of users are defined on a database. The people running the database facilitate an OAuth2 interface, and I was wondering if it is possible to use this with Nextcloud.

We would like to use their database to

  1. Authenticate users
  2. Authorize users to read or write to Folder shares in Nextcloud.

Can that be done?
Thanks.

Any thoughts out there?

I’ve been reading this

but it is not clear to me.
Thanks.