#Email reset not working

40 messages · Page 1 of 1 (latest)

clever cove
#

Ideally you should have provided the code when posting.. What else can we do? Say the error is on line 42?

gleaming jungle
#

My bad, I'll provide you with it right now

#

The page u get sent to after u click the link ur mail

                    @csrf
                    <input type="hidden" name="token" value="{{ $token }}">
                    <div class="inloggen-form-container-input">
                        <input type="email" name="email" placeholder="Email" required>
                    </div>
                    <div class="inloggen-form-container-input" id="input-password">
                        <input type="password" name="password" placeholder="Nieuw wachtwoord" required>
                        <span id="password-toggle" class="password-toggle"><i class="fas fa-eye-slash"></i></span>
                    </div>
                    <div class="inloggen-form-container-input" id="input-password">
                        <input type="password" name="password_confirmation" placeholder="Herhaal nieuw wachtwoord" required>
                        <span id="password-toggle" class="password-toggle"><i class="fas fa-eye-slash"></i></span>
                    </div>
                    <div class="inloggen-form-container-submit">
                        <input type="submit" value="Reset Wachtwoord">
                    </div>
                </form>```
#

Password reset page

                    @csrf
                        <div class="inloggen-form-container-input">
                            <input type="email" placeholder="Email">
                        </div>                      

                        <div class="inloggen-form-container-text-container">
                            <a href="http://127.0.0.1:8000/wachtwoord-vergeten">Wachtwoord vergeten?</a>
                            <a href="http://127.0.0.1:8000/account-registreren">Account aanmaken</a>
                        </div>

                        <div class="inloggen-form-container-submit">
                            <input type="submit" value="Stuur Reset Link">
                        </div>

                    </form>```
clever cove
#

And what isn't working?

gleaming jungle
#

My bad, had something to do let me provide you with the web.php

#
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\WinkelwagenController;
use App\Http\Controllers\ProductController;
use App\Http\Controllers\UserController;
use Illuminate\Support\Facades\Auth;

use App\Http\Controllers\auth\ForgotPasswordController;
Route::get('password/reset', [ForgotPasswordController::class, 'showLinkRequestForm'])->name('password.request');
Route::post('/password/email', [ForgotPasswordController::class, 'sendResetLinkEmail'])->name('password.email');
Route::get('password/reset/{token}', [ForgotPasswordController::class, 'showResetForm'])->name('password.reset');
Route::post('password/reset', [ForgotPasswordController::class, 'reset'])->name('password.update');```
#

So basically on the pass reset page if I fill in my mail and press reset email it just refreshes the page, does nothing else

#

I dont get an email or anything either

#

I have files with the registration code, etc i dont know if you need those tho but that one does work and sends me a mail

#

@clever cove ?

silver coral
#

If it "refreshes the page" you probably have validation errors, so make sure you display those

silver coral
gleaming jungle
silver coral
#

I dislike spoonfeeding too 💀 Gave you a few pointers, so you can look at the validation docs, and how to display validation errors

gleaming jungle
#

Do you know what this can mean? Cuz I filled it in

silver coral
#

<input type="email" placeholder="Email"> you'd need to add a name to it, otherwise the browser doesn't know how to send that value

gleaming jungle
#

ahh yes I just did that aswell

#

Thank you so much tho

#

So I have this right email.blade.php and in there is a template im using for newly registered accounts for email verification

#

but its using that same thing for the password reset

clever cove
#

You need the name attribute for the input, idk what your file structure has to do with it

gleaming jungle
#

I fixed the issue with the name attribute already sorry for not mentioning properly

#

So that same Template is used for the email registering aswell as the password resetting and I was wondering how to change that

clever cove
#

Just update that template?

gleaming jungle
#

@silver coral can u help me?

silver coral
#

I have no clue what the issue is now, you sent a screenshot that's unrelated to what your issue was..

gleaming jungle
noble spindle
#

ForgotPasswordController -> function reset()
Contains this:
event(new \Illuminate\Auth\Events\PasswordReset($user));

There'll be an Event Listener that is dispatching an e-mail off the back of that which will reference the "password reset" template.

For Registering, somewhere you'll be emitting an Event, or sending an e-mail.

If you need further assistance, sharing your Registration logic will be key

gleaming jungle
noble spindle
#

Please share detailed information, screenshots, code samples, otherwise nobody can help you

#

It's like saying "my car doesn't work", with zero context, the more you share, the more people can help