dimanche 2 décembre 2018

Is it safe to save a authenticated user info in window

I am using laravel vue. In my first page load, I try to assign the auth user like this. In my blade file I use

<script>

    (function () {
        window.Laravel = {
            csrfToken: ''
        };


        @if(Auth::check())
          window.user={!! Auth::user() !!}
         @else
            window.user=false
         @endif
    })();
  </script>

My question is, can user manipulate this window somehow from the browser? I don't use this directly instead I use it from vuex.

Many thanks.



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2DXn1PJ
via IFTTT

Aucun commentaire:

Enregistrer un commentaire