-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move files_external backends to separate apps #27049
Comments
Note that from desktop client perspective, we'd want to possibly only support OAuth at some point. So if you have it external, you're making life harder when installing oC. Maybe not a big issue. CC @ogoffart |
This is not related at all to the desktop or mobile client. It's the oauth tokens that the OC server uses to connect to external storages like Dropbox, etc. |
and the auth backends listed here are the ones used to connect to external storages from the server. |
Gdrive: #28074 and https://github.com/owncloud/files_external_gdrive, still work in progress as some adjustments are needed |
Hello @PVince81 Currently Google Drive OAuth2 Grant sends a request to
Any other thoughts @butonic ? |
@Hemant-Mann we should remove these files from core eventually so don't rely on them. Also in the future core (or its files_external bit) must not know about any specific storage implementation. So I suggest you grab the oauth2.php and oauth2.js files and provide them in your app and adjust them accordingly. Note that to load a custom JS file you need |
@PVince81 Okay I will provide customJs as mentioned by you but as of now there is no way for the customJs to know when the OAuth2 grant is request by the client See this https://github.com/owncloud/core/blob/master/apps/files_external/js/oauth2.js#L65 A click event is attached on the button, and the function sends a request to backend So instead of hard coding what should happen when the user clicks on the button we can trigger another event on which event handlers can be attached in the customJs provided separately by each backend config (as you suggest core must not know about specific implementation) After this line https://github.com/owncloud/core/blob/master/apps/files_external/js/oauth2.js#L71 $('.configuration').trigger('oauth_step1', [{
storage_id: tr.attr('class'),
client_id: client_id,
client_secret: client_secret,
redirect: location.protocol + '//' + location.host + location.pathname + '?sectionid=storage',
context: $(this)
}]) and this event can be handled in the customJS as I am doing it here https://github.com/Hemant-Mann/files_external_dropbox/blob/dev/js/dropbox.js#L41 Any thoughts @butonic ? |
As you like, feel free to make a PR to core |
PR #28179 with the proposed changes |
Secondary s3 storage integration just got move over to https://github.com/owncloud/files_external_s3. |
This issue has been automatically closed. |
Port all external storage backends from files_external to be separate apps:
storage backends
authentication backends
@DeepDiver1975 FYI
The text was updated successfully, but these errors were encountered: