CakeDC / users

Users Plugin for CakePHP
https://www.cakedc.com
Other
519 stars 295 forks source link

Feature request - Disable social routes if social login is disabled #998

Open hacheraw opened 2 years ago

hacheraw commented 2 years ago

Could you only add social related routes if social login is enabled?

Something like what you do with oauthPath in routes.php#L38.

I was about to make a PR with

if (Configure::read('Users.social.login')) {
    // Social routes
}

but there are several routes in several lines and I don't know if I can move them to only do an IF.

rochamarcelo commented 2 years ago

Hi @challgren ,

We could analyse this, but for now you could ignore the plugin routes and configure in your own config/routes.php files. To not load plugin routes:

$this->addPlugin('CakeDC/Users', ['routes' => false]);

And remember to setup the routes you want in your config/routes.php

ajibarra commented 1 week ago

@rochamarcelo any update on this? is there something that needs to be implemented?