Skip to content

Commit

Permalink
Check registration feature on error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
joelbutcher authored Mar 9, 2022
1 parent b3f7df8 commit ff53de9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Http/Controllers/OAuthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ public function handleProviderCallback(Request $request, string $provider, Resol
if ($request->has('error')) {
return Auth::check()
? redirect(config('fortify.home'))->dangerBanner($request->error_description)
: redirect()->route('register')->withErrors($request->error_description, 'socialstream');
: redirect()->route(
FortifyFeatures::enabled(FortifyFeatures::registration()) ? 'register' : 'login'
)->withErrors($request->error_description, 'socialstream');
}

try {
Expand Down

0 comments on commit ff53de9

Please sign in to comment.