itsnubix/laravel-nuxt

Disabling email confirmation after registration

Squadz opened this issue · 1 comments

SUMMARY
After the user is registered, the application request him to confirm his email address.
Disabling 'verified' => \App\Http\Middleware\EnsureEmailIsVerified::class, in Kernel.php will not disable the email verification feature.

STEPS TO REPRODUCE
Create a new user

OBSERVED RESULT
Request email verification, even after commenting 'verified' => \App\Http\Middleware\EnsureEmailIsVerified::class,

EXPECTED RESULT
No email verification

WORKAROUND
Add the current timestamp for "email_verified_at" field when we POST to /api/register

ADDITIONAL INFORMATION
The frontend keep redirecting the user to the email verification page. We should be able to deactivate this feature from the backend.

So there's two middlewares here to disable...one for the frontend and one for the backend. If you go to client/pages/index.vue you'll see there's a call:

definePageMeta({
  middleware: ['auth', 'verified'],
})

Just remove the verified middleware here.