-
Notifications
You must be signed in to change notification settings - Fork 24
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
Add default client ids for desktop and mobile clients #38
Conversation
Codecov Report
@@ Coverage Diff @@
## master #38 +/- ##
=========================================
Coverage 96.95% 96.95%
Complexity 148 148
=========================================
Files 18 18
Lines 492 492
=========================================
Hits 477 477
Misses 15 15 Continue to review full report at Codecov.
|
|
||
private static $registry = [ | ||
['Desktop Client', 'http://localhost:*', 'xdXOt13JKxym1B1QcEncf2XDkLAexMBFwiT9j6EfhhHFJhs2KM9jbjTmf8JBXE69', 'UBntmLjC2yYCeHwsyj73Uwo9TAaecAetRwMw0xYcvNL9yRdLSUi0hUAHfvCHFeFh'], | ||
['Android', 'oc://android.owncloud.com', 'e4rAsNUSIUs0lF4nbv9FmCeUkTlV9GdgTLDH1b5uie7syb90SzEVrbN7HIpmWJeD', 'dInFYGV33xKzhbRmpqQltYNdfLdJIfJ9L5ISoKhNoT9qZftpdWSP71VrpGR9pmoD'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oc:// is actually a very short name. It it not true that these need to be globally registered on the whole phone?
Would it not be better to have something longer such as owncloud:// or even owncloudauth:// ?
Also, can two different owncloud client co-exist on the same phone? (say, a branded client, the original owncloud client, and the nextcloud client)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good points, but only relevant for the current POC in Android. For the final implementation we will not register the callback globally and will not use an external web browser. Everything will happen in a WebView owned by the app, and only it will monitor the URLs loaded.
I like owncloud:// , that's what we used originally; oc:// was just more handy :)
Will work for the Desktop Client. |
Works for mobile clients too. Could be moved further if the oauth2 app accepted public clients (client_id with no secret_id bound). With this approach we are setting a secret that is not really a secret. |
private static $registry = [ | ||
['Desktop Client', 'http://localhost:*', 'xdXOt13JKxym1B1QcEncf2XDkLAexMBFwiT9j6EfhhHFJhs2KM9jbjTmf8JBXE69', 'UBntmLjC2yYCeHwsyj73Uwo9TAaecAetRwMw0xYcvNL9yRdLSUi0hUAHfvCHFeFh'], | ||
['Android', 'oc://android.owncloud.com', 'e4rAsNUSIUs0lF4nbv9FmCeUkTlV9GdgTLDH1b5uie7syb90SzEVrbN7HIpmWJeD', 'dInFYGV33xKzhbRmpqQltYNdfLdJIfJ9L5ISoKhNoT9qZftpdWSP71VrpGR9pmoD'], | ||
// ['iOS', '???', 'mxd5OQDk6es5LzOzRvidJNfXLUZS2oN3oUFeXPP8LpPrhx3UroJFduGEYIBOxkY1', 'KFeFWWEZO9TkisIQzR3fo7hfiMXlOpaqP8CFuTbSHzV1TUuGECglPxpiVKJfOXIx'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we use oc://ios.owncloud.com as callback URL for the iOS client? The old iOS code is not testable right now, but the URI should work anyway.
What's the status before this can be merged? |
Fine for me, we can have the iOS callback URL when client is ready. |
@DeepDiver1975 is this behaving as expected? Just downloaded |
@DeepDiver1975 bump! (see my last comment & @ogoffart's owncloud/client#5825 (comment)):
|
i will look into this these days ... thx for pinging |
@DeepDiver1975 any news? |
this one requires #37