How to access session in twig? I wondering how to access to session in twig ?

In my Controller I have this part of code :

   $tempstore = \Drupal::service('user.private_tempstore')-&gt;get('mdm_user');
   $tempstore-&gt;set('num_donateur', $num_donateur);


I tried to display the session in my twig template :

  {% set mdm_session = app.session.get('mdm_user') %}
  {{ dump(mdm_session) }}


But nothing is displayed. Even session is inaccessible.

  {{ dump(session) }}


Any help would be appreciated.
Try this:

{% set varname = app.session.get('varname') %}


This is the session value {{varname}}