I'm using CakeDC's Users Plugin for authentication. I've followed all the steps of installation as documented here, but i'm getting this error:
I've performed the following steps:
composer require cakedc/users
composer require league/oauth2-facebook:@stable
composer require league/oauth2-google:@stable
bin/cake migrations migrate -p CakeDC/Users
- In config/bootstrap.php
Configure::write('Users.config', ['users']);
Plugin::load('CakeDC/Users', ['routes' => true, 'bootstrap' => true ]);
Configure::write('Users.Social.login', true); //to enable social login
Load the Component in your src/Controller/AppController.php, and use the passed Component configuration to customize the Users Plugin:
$this->loadComponent('CakeDC/Users.UsersAuth');
Update: I've removed
Configure::write('Users.config', ['users']);
this line from my bootstrap as i'm using the default users.php file which is present inside the plugin now. But i get this error now:
Invalid provider or missing class (League\OAuth2\Client\Provider\LinkedIn)
I can get rid of this error by disabling social login (which is not what i want to do):
Configure::write('Users.Social.login', false);
After disabling the social login i get this error:
Error: A route matching "array ( 'plugin' => 'CakeDC/Users', 'controller' => 'Users', 'action' => 'login', 'prefix' => false, '_ext' => NULL, )" could not be found.
Any help would save my day.