kirby-oauth icon indicating copy to clipboard operation
kirby-oauth copied to clipboard

support submodule and zip installation

Open bnomei opened this issue 5 years ago • 6 comments

to be listed at the offical kirby 3 plugin list you need to allow all three installation modes (composer, gitmodule and zip).

please check out the official example repo for a plugin with composer dependencies

it boils down to a special gitignore file and a reduced commited vendor folder. i know it's not the clean php composer way but it seems to be the best choice for kirby plugins.

apart from that i will certainly try out your plugin asap. ❤️

bnomei avatar May 13 '19 11:05 bnomei

Thanks! The question is: How can we support all providers by not requiring the installation via composer. I currently don’t have a proper solution for this.

thathoff avatar May 13 '19 12:05 thathoff

https://getkirby.com/docs/guide/plugins/plugin-setup-composer

you already have the required libs to composer.json. you just need to update the gitignore file to the provided example from the docs. this will allow you to commit a reduced version of the vendor folder. that is all you have to do.

bnomei avatar May 13 '19 14:05 bnomei

Yeah I know. But the problem is the plugin itself is basically useless without installing additionally dependencies. To use Google as an identity provider you have to manually add the league/oauth2-google package or for Facebook the league/oauth2-facebook. So I think the only option would be to include the most common providers in the distributed vendor folder and only support additional providers via composer (which I actually don’t like very much) ;).

thathoff avatar May 13 '19 14:05 thathoff

ah understood. since creating custom kirby plugins is more or less easy but at least well documented you could provide an example how to create a simple one (with composer) for the auth lib instead of just saying one needs to use composer for everything.

add to readme something like this:

  • download zip of you plugin, submodule or composer (with altered gitignore)
  • if composer just require auth lib or else
  • create a custom plugin in site/plugins using composer setup and require lib there.

bnomei avatar May 13 '19 14:05 bnomei

Hmm, I like the idea of a custom plugin. But nevertheless you always need composer so I don’t see a real advantage in providing other installation methods. But we will definitely think about a nice solution to this issue. Thank’s for your input!

thathoff avatar May 13 '19 14:05 thathoff

it happend to me that people try to use the zip and then file an issue. if you adhere to the pluginkit way of commiting the vendor folder your plugin is at least working standalone. someone else could then wrap a simple plugin for custom auth and plush that. others could just use the zips of these to get started. they would not need composer then.

bnomei avatar May 18 '19 08:05 bnomei