laravel / fortify

Backend controllers and scaffolding for Laravel authentication.

Home Page:https://laravel.com/docs/fortify

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Laravel fortify authenticateUsing

GitzJoey opened this issue · comments

hi, i'm using laravel fortify and using feature of authenticateUsing coz i want to apply some custom Rules on the password field like so

Fortify::authenticateUsing(function (Request $request) {
        $request->validate([
            'password' => new mustResetPassword($request['email'])
        ]);

        return User::where('email', $request->email)->first();
    });

the problem is, i just realize that the standard rules is being ignored (eg, the required rules for the email fields). This because the based on the source code it return the callback without executing the standard rules

is there anyway to keep applying the default rules of authenticateUsing, and add a custom rules like my case?

Hi there,

Thanks for reporting but it looks like this is a question which can be asked on a support channel. Please only use this issue tracker for reporting bugs with the library itself. If you have a question on how to use functionality provided by this repo you can try one of the following channels:

However, this issue will not be locked and everyone is still free to discuss solutions to your problem!

Thanks.

Hi @driesvints
i think you misunderstood (maybe how i explain also wrong)
the issue is fortify::authenticateUsing is replacing or ignoring the default validation of fortify (shown in this sourcecode
i wish there's possiblities to cater my scenario which is actually i just want to add another validation rules, rather than just replacing the whole AttemptToAuthenticate validation

just fyi i already tried to discuss in all channel u mention above, but no reply, hence i'm tried here

@GitzJoey it's best that if you want to change anything here that you attempt a PR. Thanks