I'm using the default laravel auth method.
When I try to reset a password, everything work fine until i try to send the reset form.
At this moment, it just send me an error with any log.
I know an error is sent because I added the following line to App\Exceptions\handler.php
public function report(Exception $exception)
{
Artisan::call('sms:basic');
parent::report($exception);
}
So, I'm recieving the notification that an error occured. I'm not logged in and the new password is not working.
When this happen, the laravel.log file is empty. So I don't know why is not working.
There is the route I use:
Auth::routes();
There is the view file.
@extends('layouts.public')
@section('content')
<!-- RESET FORM -->
<!--===================================================-->
<div class="cls-content">
<div class="cls-content-sm panel">
<div class="panel-body background-black fix-margin-top">
<div class="text-left"><img style="height: 90px; width: auto;margin-left: -25px;" src="{{ url('/img/logoTorqueWhite.svg') }}" alt="" class=""></div>
</div>
</div>
<div class="cls-content-sm panel ">
<div class="panel-body fix-margin-top">
<div class="pull-right"><a class="black" href="{{ url('/') }}"><i class="fa fa-times"></i></a></div>
<div class="row">
<div class="col-xs-12 col-sm-8 vert-line">
<p>Réinitialiser votre mot de passe</p>
@if (session('status'))
<div class="alert alert-success">
{{ session('status') }}
</div>
@endif
<form method="POST" role="form" action="{{ url('/password/reset') }}">
<div class="form-group text-left{{ $errors->has('email') ? ' has-error' : '' }}">
<label>Courriel</label>
<input id="email" type="email" name="email" class="form-control" placeholder="" value="{{ old('email') }}">
@if ($errors->has('email'))
<span class="form-control">
<strong>{{ $errors->first('email') }}</strong>
</span>
@endif
</div>
<div class="form-group text-left{{ $errors->has('password') ? ' has-error' : '' }}">
<label>Mot de passe</label>
<input type="password" name="password" class="form-control" placeholder="">
@if ($errors->has('password'))
<span class="form-control">
<strong>{{ $errors->first('password') }}</strong>
</span>
@endif
</div>
<div class="form-group text-left{{ $errors->has('password_confirmation') ? ' has-error' : '' }}">
<label>Confirmer le mot de passe</label>
<input type="password" name="password_confirmation" class="form-control" placeholder="">
@if ($errors->has('password_confirmation'))
<span class="form-control">
<strong>{{ $errors->first('password_confirmation') }}</strong>
</span>
@endif
</div>
<div class="col-xs-12 no-padding">
<div class="form-group text-right">
<input name="reset" type="submit" class="btn btn-torque" value="RÉINITIALISER">
</div>
</div>
</form>
</div>
<div class="col-xs-12 col-sm-4">
<div class="valign text-right">
<p>Contactez-nous<br>
(819) 679-2944<br>
info@torquemanagement.ca</p>
</div>
</div>
</div>
<div class="row text-left">
{{--<div class="col-xs-12">
Vous avez oublié votre mot de passe? <a href="/password/reset">Cliquez ici</a><br>
Vous n'avez pas encore de compte Torque? Créé un compte
</div>--}}
</div>
</div>
</div>
</div>
<!--===================================================-->
@endsection
I saw somewhere else someone asking to add this route:
Route::get('test', function(){
dd ( bcrypt('raw_password') == "encrypted_password_in_db");
});
It return me false and the guys was saying it suppose to return true. There was no other explanation about this, but maybe it can help you helping me. I don't really know what this is suppose to mean.
When you save a new password use
Hash::make('newpassword')
After it will work:
Route::get('test', function(){
dd (Hash::check('raw_password', 'encrypted-password'));
});
The Laravel use always a random salted password, so you can't check it with ==