cakephp-opauth
cakephp-opauth copied to clipboard
.gitignore on Strategy
Why on earth? If I pull down the repo, I can't add submodules to the Strategy/ folder because of the .gitignore file.
Also, is it possible to add the Google Strategy as a submodule instead, as you have done with Vendor? It would really simplify build process..
Thanks!
You can still place files in Strategy/ despite of the .gitignore. You're not supposed to have nested git repos anyway.
Do try loading of opauth, cakephp-opauth and google strategy via Composer. That would be much simpler.
No, it wouldn't. When doing so using Composer, CakePHP complains that it cannot find the strategies. of course, because the strategies are not placed within Cakephp-opauth/Strategy. So If I add a custom installer path:
"Plugin/Opauth/Strategy/Google": ["opauth/google"],
"Plugin/Opauth/Strategy/OpenID": ["opauth/openid"],
then this should solve the problem. But not when .gitignore is effectively ignoring all files
Also: Installing CakePHP-opauth with opauth-google and opauth-openid, with no other requirements or configuration, I end up the following structure:
- Plugin
+ Opauth
+ Strategy
- empty directory
- vendor
+ opauth
+ opauth
+ google
+ openid
If I set vendor-dir to Plugin, the same structure appears, only that the folders in vendor is now in Plugin.
In conclusion, Strategies are not placed under Opauth as your documentation states. Please fix this issue, as it makes it a pain to maintain a proper composer.json file.
When loading via Composer, the strategies do not have to be in strategy_dir as Composer's autoloader automatically handles it.
All you have to do is simply:
"require": {
"uzyn/cakephp-opauth": "1.*",
"opauth/facebook": "*",
"opauth/twitter": "*"
}
(There's not even a need to require opauth/opauth, but no harm if you explicitly require it)
And to load, you simple have to add this line to your app's bootstrap.php:
<?php
CakePlugin::load('Opauth', array('routes' => true, 'bootstrap' => true));
if this resolves your issue @davidsteinsland please let us know to close this issue