Merge branch '339-fix-verify' into 'develop'
fix: 🐛 remove auth middleware from email verification
See merge request ldc-web/projets/le-gaulois!304
This commit is contained in:
commit
8b3c8b8781
1 changed files with 2 additions and 2 deletions
|
|
@ -26,7 +26,7 @@ class VerificationController extends Controller
|
|||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('auth:club');
|
||||
$this->middleware('auth:club')->except('verify');
|
||||
$this->middleware('signed')->only('verify');
|
||||
$this->middleware('throttle:6,1')->only('verify', 'resend');
|
||||
}
|
||||
|
|
@ -56,7 +56,7 @@ class VerificationController extends Controller
|
|||
public function verify(Request $request): \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse
|
||||
{
|
||||
/** @var \App\Models\Customer */
|
||||
$user = $request->user('club');
|
||||
$user = Customer::findOrFail($request->route('id'));
|
||||
|
||||
if (!hash_equals((string) $request->route('id'), (string) $user->getKey())) {
|
||||
throw new AuthorizationException();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue