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

add route named login if not exists #10

Open
jpuck opened this issue Dec 7, 2017 · 0 comments
Open

add route named login if not exists #10

jpuck opened this issue Dec 7, 2017 · 0 comments

Comments

@jpuck
Copy link
Member

jpuck commented Dec 7, 2017

By convention, laravel assumes a route named login exists to redirect unauthenticated requests.

This package names its route shibboleth-login because it's designed to work alongside other authentication providers, such as the default scaffolding provided by artisan. But if this is the only authentication provider, then that name will need to be manually declared. e.g.

Route::name('login')->get('/login', '\\'.Route::getRoutes()->getByName('shibboleth-login')->getActionName());

or more readable, but with a redirect:

Route::redirect('/login', '/shibboleth-login')->name('login');

One solution to this problem could be to declare the route named login if it doesn't already exist. However, this might get tricky with route loading and precedence order.

Another possible solution would be to allow a configuration to rename the routes.

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

No branches or pull requests

1 participant