-
-
Notifications
You must be signed in to change notification settings - Fork 547
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
[5.x] Ability to disable CP authentication #8960
Conversation
Even when CP Auth has been disabled
# Conflicts: # routes/cp.php
Is this planned for 4.X? We would use this in almost all our apps that have a Statamic installation. |
Sorry, we don't have an ETA for reviewing/merging this pull request. We'll get to it when we can. In the meantime, you can pull this PR into your project with a composer patch. |
No problem. Thanks for the update and the composer patch package link - very useful! |
I was giving this a try with composer patch, all went well. Except, within Shouldn't this:
Be:
|
@DwainsWorld Yes, it should be, thanks! I've updated this PR. |
6cf79b6
to
e39db24
Compare
This works great for me, thanks Duncan! |
Yes, I've run into this. This flow needs to be reconsidered when CP login is disabled. We use it in a passwordless login situation so this part makes no sense, it should log out and redirect to the appropriate page. |
# Conflicts: # tests/Tags/User/ForgotPasswordFormTest.php # tests/Tags/User/LoginFormTest.php # tests/Tags/User/PasswordFormTest.php # tests/Tags/User/RegisterFormTest.php
Instead, redirect when there's an actual 401. Apparently it's not completely accurate. You could get a few requests that return zero. It's fine for controlling when the modal pops up, but not a redirect. If you redirect, when you hit the login page your session will be extended, keeping you logged in.
* Allow configuring the Stache's Cache Store Related: statamic/cms#10303 * Ability to disable CP authentication Related: statamic/cms#8960 * Display custom logo as plain text Related: statamic/cms#10350 * Track sites.yaml path in git integration config Related: statamic/cms#10463 * Add ability to specify the queue connection on static:warm command Related: statamic/cms#8634
This pull request implements a new config option, allowing developers to disable the Control Panel authentication pages.
Often times, if you're using something like Jetstream or Laravel Nova which provide their own login pages then you don't want an additional login page for users to somehow find their way to.
Authentication can be disabled by toggling the
statamic.cp.auth.enabled
option. You may optionally specify a URL for users to be redirected to instead:This PR replaces my previous PR, #7617.