Skip to content
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 Phoenix redirectUrl, clientId, secret to the preinstalled clients? #226

Open
michaelstingl opened this issue Oct 10, 2019 · 2 comments

Comments

@michaelstingl
Copy link

Should we add Phoenix redirectUrl, clientId, secret to the list of the preinstalled/default clients? @DeepDiver1975 @butonic

/**
* This adds the default client ids for ownCloud mobile and desktop clients
*/
class Version20170329194544 implements ISimpleMigration {
private static $registry = [
['Desktop Client', 'http://localhost:*', 'xdXOt13JKxym1B1QcEncf2XDkLAexMBFwiT9j6EfhhHFJhs2KM9jbjTmf8JBXE69', 'UBntmLjC2yYCeHwsyj73Uwo9TAaecAetRwMw0xYcvNL9yRdLSUi0hUAHfvCHFeFh'],
['Android', 'oc://android.owncloud.com', 'e4rAsNUSIUs0lF4nbv9FmCeUkTlV9GdgTLDH1b5uie7syb90SzEVrbN7HIpmWJeD', 'dInFYGV33xKzhbRmpqQltYNdfLdJIfJ9L5ISoKhNoT9qZftpdWSP71VrpGR9pmoD'],
['iOS', 'oc://ios.owncloud.com', 'mxd5OQDk6es5LzOzRvidJNfXLUZS2oN3oUFeXPP8LpPrhx3UroJFduGEYIBOxkY1', 'KFeFWWEZO9TkisIQzR3fo7hfiMXlOpaqP8CFuTbSHzV1TUuGECglPxpiVKJfOXIx']
];
/**
* @param IOutput $out
*/
public function run(IOutput $out) {
// this is necessary to make the app work with OC <10.0.3
\OC_App::loadApp('oauth2', false);
foreach (self::$registry as list($name, $redirectUrl, $clientId, $secret)) {
try {
$this->addClient($name, $redirectUrl, $clientId, $secret);
$out->info("The client <$name> has been added.");
} catch (UniqueConstraintViolationException $ex) {
$out->info("The client <$name> already known.");
}
}
}

@DeepDiver1975
Copy link
Member

sounds reasonable - another idea could be is allow any client to connect which lives on the same domain.
seems to be a common practice ....

@michaelstingl
Copy link
Author

another idea could be is allow any client to connect which lives on the same domain.

Ah, for web-based/-hosted clients. But this depends on the individual setup… Sometimes it's not on the same domain?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants