-
Notifications
You must be signed in to change notification settings - Fork 54
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
The login page is not redirecting to the access controlled page? #199
Comments
I am experiencing the same issue, can not get redirection after login get to work as expected. In short, is there a simple way to have a button/link navigating to a login page, and after successful login get redirected back to the page on which the login prompt was started? (I am displaying additional content on a page when user is logged in, so no place basic for |
For anyone interested, I got it working by using custom login page "/login" and custom php twig extension, called from a template user/plugins/login/templates/login.html.twig login.html.twig
the function
EDIT: few tweaks and https compatible |
@otahirs Is this a universal fix? Is it worth offering as a pull request? |
@bobrocke It is just a dirty workaround as it is not using the plugin default files and rely on caling separate php code within a template and the /login path is absolute to my setup. I made it after failing trying to understand the plugin own php code as I am not that experienced programmer. However, the idea behind it works and with a little bit of php knowledge could be easily implemented into the existing plugin. |
I'm still having the problem after updating to Grav v1.6.0-rc.2 and Login v3.0.0-rc.2. |
Any news about resolving this bug? I have been having this problem since version 1.5. When logging in, it does not return to the page that was previously requested as it should be the default behavior of the plugin. Help us |
Same for me. |
Can you guys please test the commit above? |
Now, it worked perfectly, thank you. |
do you have an approximate date when this fix will go in the stable release (3.0.3)? |
I have a site with an access controlled page at
addpage-blog-post
which redirects to the login page,authenticate
, as expected. But once logged in, the user is not redirected back to theaddpage-blog-post
as the default behavior suggests.authenticate.md
haslogin_redirect_here: false
set. And the plug-in YAML configuration is default withredirect_after_login:
.What have I misconfigured?
The text was updated successfully, but these errors were encountered: