What I have: Im developing in Laravel 5.3 and calling an API with vue.js. The workaround is I submit the form with vue.js, make a call to the API and returned a token if all ok.
Problem: Google Chrome dont remember my login credentials after an sucessfull login (Edge, Firefox and Safari yes).
What I try: Like I have seen in other questions in StackOverflow (Mostly here), I have put a name attribute to the tags (Even if I use email instead of username). Don't use prevent of vue.js. Do all the login and finish with an .submit(); No one works in Chrome.
My code:
<form id="loginForm" class="form-horizontal m-t-20" v-on:submit.prevent="login" action="{{secure_url('/')}}" autocomplete="on">
<div class="form-group">
<div class="error col-xs-12"></div>
</div>
<div class="form-group ">
<div class="col-xs-12">
<input name="username" class="form-control" v-model="email" type="text" required="" placeholder="{{Lang::get('general.email')}}">
</div>
</div>
<div class="form-group">
<div class="col-xs-12">
<input class="form-control" name="password" v-model="password" type="password" required="" placeholder="{{Lang::get('general.password')}}">
</div>
</div>
<div class="form-group text-center m-t-40">
<div class="col-xs-12">
<button class="btn btn-primary btn-block text-uppercase waves-effect waves-light" type="submit">{{Lang::get('general.logIn')}}</button>
</div>
</div>
</form>
Thanks for your time and help.