Symfony 5 Security: Authenticators
The Special IS_AUTHENTICATED_ Strings
  Start your All-Access Pass to unlock this challenge
Buy Access Login

Challenge 1 / 1

Imagine I have the following link in Twig:

{% if is_granted('IS_AUTHENTICATED_REMEMBERED') %}
    <a href="{{ path('app_change_password') }}">Change Password</a>
{% endif %}

And this code in the controller:

/**
 * @Route("/change/password", name="app_change_password")
 */
public function changePassword()
{
    $this->denyAccessUnlessGranted('IS_AUTHENTICATED_FULLY');
}

Does this code make sense?

Skip challenges and go to theNext Chapter

Turn Challenges Off?

All further challenges will be skipped automatically.
You can re-enable challenges at any time on this page or from your account page.