Hot answers tagged

2 votes
Accepted

Redirection from user login to another page for logged in users

I don't understand how the latter works, I looked at UserLoginForm.php in addition to user.login.form, but I found no clue. What is involved here? In core there is an exception event subscriber ...
user avatar
  • 89.2k
2 votes
Accepted

Authentication from a dynamically generated form

Roles are config, whereas routes are code. As such, it's generally better to set a route to a permission, which is code based, rather than a role, so that both the route and permission are controlled ...
user avatar
  • 15k
1 vote

Authentication from a dynamically generated form

Try adding _csrf_token: "TRUE" in the routing requirements, like so, requirements: _csrf_token: 'TRUE' You will also be required to auto generate the token from Drupal and use it in the ...
user avatar
1 vote

Take over display of a content type node route

Here is the other answer that was here but for some reason was deleted today. The answer provided by Shawn works great, but if you would prefer to have separate controllers per content type eg. ...
user avatar
  • 269

Only top scored, non community-wiki answers of a minimum length are eligible