title: Laravel 5.5 Passport client_secret and Vue JS Auth
body: <p>Good Day everyone,</p>
  
  <p>I'm learning Laravel Passport and Vue.JS(standalone) at the same time.
  I'm using <code>Password Grant Token</code> to authenticate the user.</p>
  
  <p>I encounter this issue that the <code>secret_key</code> must be always hidden.</p>
  
  <p>I have this <code>Login Component</code> in my vuejs where I need to add the <code>client_secret</code> as parameter to get access token. However, since VUEJS is a javascript framework. there's a way that someone can see the <code>client_secret</code> on the minified build file.</p>
  
  <p>my question is that, is it just normal? is there a way to conceal the <code>client_secret</code>? </p>
  
  <p>at first I don't mind the issue since I have implemented <code>CORS</code> on laravel where I can only select the <code>allowedOrigins</code>. My thinking is that it doesn't matter if they know the secret key as long as I can filter the <code>allowedOrigins</code>.</p>
  
  <p>Here's my code in VUEJS</p>
  
  <pre><code>login(){
          this.$validator.validateAll().then((result) =&gt; {
            if (result) {
                var data = {
                  client_id: 3,
                  client_secret: 'client-secret key',
                  grant_type: 'password',
                  username: this.inputs.email,
                  password: this.inputs.password
              }
              this.$http.post("oauth/token", data).then(response =&gt; {
                  this.$auth.setToken(response.body.access_token, response.body.expires_in + Date.now());
                  bus.$emit('reload');
                  this.$router.push('/');
              })
            }
          });
        }
  </code></pre>
  
  <p>Any advice will be appreciated.</p>
  
  <p>Thanks in advance.</p>