Skip to content

Commit

Permalink
check if custom url set, redirect to the url
Browse files Browse the repository at this point in the history
If the guard_name is defined, the code will fall back to onPasswordlessLoginSuccess(). However if the request contains redirect_to custom url, the code will ignore instead of use the custom url.
  • Loading branch information
afzafri authored and edgrosvenor committed Dec 6, 2020
1 parent ad05733 commit 67b2bf6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Traits/PasswordlessLogin.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function createPasswordlessLoginLink()
*/
public function onPasswordlessLoginSuccess($request)
{
return redirect($this->getRedirectUrlAttribute());
return ($request->has('redirect_to')) ? redirect($request->redirect_to) : redirect($this->getRedirectUrlAttribute());
}

/**
Expand Down

0 comments on commit 67b2bf6

Please sign in to comment.