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.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire