code: def after_init_app(self, app: FlaskUnchained):
          
  
          from flask_wtf.csrf import generate_csrf
  
          # send CSRF token in the cookie
          @app.after_request
          def set_csrf_cookie(response):
              if response:
                  response.set_cookie('csrf_token', generate_csrf())
              return response
docs: Configure an after request hook to set the ``csrf_token`` in the cookie.