Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open auth up to support any method #16

Closed
viezel opened this issue Sep 8, 2020 · 1 comment
Closed

Open auth up to support any method #16

viezel opened this issue Sep 8, 2020 · 1 comment

Comments

@viezel
Copy link

viezel commented Sep 8, 2020

Im looking into adding Single Sign On support in Fortify. If we had the ability to add extra steps in the pipeline shown in the below code from Laravel\Fortify\Http\Controllers\AuthenticatedSessionController, then its extensible to add SSO or other auth methods into the mix.

public function store(LoginRequest $request)
{
    return (new Pipeline(app()))->send($request)->through(array_filter([
        config('fortify.limiters.login') ? null : EnsureLoginIsNotThrottled::class,
        RedirectIfTwoFactorAuthenticatable::class,
        AttemptToAuthenticate::class,
        PrepareAuthenticatedSession::class,
    ]))->then(function ($request) {
        return app(LoginResponse::class);
    });
}

agree?

@taylorotwell
Copy link
Member

taylorotwell commented Sep 10, 2020

Fortify 1.1.0 has been released with Laravel\Fortify\Fortify::loginThrough method... this method should return the authentication pipeline array you wish to use - allowing full customization. Could add this to the boot method of your JetstreamServiceProvider:

Fortify::loginThrough(function ($request) {
    return [
        //
    ];
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants