Tag

Authentication

4 posts tagged Authentication.

Posts

  • Diagram: HttpClient through authInterceptorFn, which adds an Authorization header before the request reaches the server, with the 401 response looping back to the interceptor.

    09/02/2026

    An Angular auth interceptor, the functional way

    Attach a token to every outgoing request and handle a 401 in one place, using the functional HttpInterceptorFn rather than the class-based interceptor most search results still show.

  • Diagram: a role hierarchy showing ROLE_ADMIN above ROLE_USER, beside three IS_AUTHENTICATED variants marked with which ones a plain visitor passes.

    09/02/2026

    is_granted in Twig: roles and IS_AUTHENTICATED

    is_granted takes more than roles, and picking the wrong one gives you a check that quietly passes when it should not. What each attribute tests, why role hierarchy makes ROLE_USER true for your admins, and where the check belongs.

  • Diagram: a crossed-out FOSUserBundle block opening into four replacement components -- Security, MakerBundle, ResetPasswordBundle and VerifyEmailBundle.

    09/02/2026

    Leaving FOSUserBundle: what replaces each piece

    The bundle is maintained only enough for existing projects to migrate off it. Every piece it provided now has a replacement in Symfony itself or in two small bundles - and the migration is mostly deletion.

  • Conditional User State in Twig Views

    04/28/2015

    Show the logged-in user in a Twig template

    The snippet everyone has saved uses app.user.username, which throws on every supported Symfony. Here is the version that works, which check to guard it with, and how to greet somebody by name rather than by email address.