kirby-oauth
kirby-oauth copied to clipboard
support submodule and zip installation
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. ❤️
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.
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.
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) ;).
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.
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!
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.