Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
hacheraw opened this issue Mar 30, 2022 · 2 comments
Open

Comments

@hacheraw
Copy link

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
Copy link
Collaborator

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
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants