PLATFORM
  • Tails

    Create websites with TailwindCSS

  • Blocks

    Design blocks for your website

  • Wave

    Start building the next great SAAS

  • Pines

    Alpine & Tailwind UI Library

  • Auth

    Plug'n Play Authentication for Laravel

  • Designer comingsoon

    Create website designs with AI

  • DevBlog comingsoon

    Blog platform for developers

  • Static

    Build a simple static website

  • SaaS Adventure

    21-day program to build a SAAS

Question By
Unsolved

OAuth Login Does Not Automatically Send Verification Email

produkt

Mar 12th, 2025 12:59 PM

If you have enabled OAuth login for social sign on (I've only tried Google), and you also have email verification enabled, the user does not automatically get sent an email when they reach the verification screen. They can click the link and the email will be sent but it is not automatically sent upon loading the page.

bobbyiliev

Mar 13th, 2025 02:46 AM

Hey!

You're right, by default, the verification email isn't sent automatically when using OAuth login with email verification enabled. However, in most setups, social logins like Google already verify the user's email, so it's common to mark the email as verified during account creation (e.g., using email_verified_at):

    private function createUser($socialiteUser)
    {
        return app(config('auth.providers.users.model'))->create([
            'name' => $socialiteUser->getName(),
            'email' => $socialiteUser->getEmail(),
            'email_verified_at' => now(),
        ]);
    }

If you're only using social login, you may not need to require email verification at all, since the OAuth provider has already handled that.

produkt

Mar 13th, 2025 04:45 AM

That makes sense to not require email verificationn with SSO. However, when I create a new account using Google OAuth, the email_verified_at field remains blank even though my code looks like what you posted above and it's still trying to make me verify. Why is that happening?

produkt

Mar 16th, 2025 01:23 PM

Any information on this?

bobbyiliev

Mar 17th, 2025 12:50 AM

Yes, indeed, this is not possible with the current version. But definitely a good idea for a new feature!

produkt

Mar 17th, 2025 07:24 AM

Bummer, any idea on how I can make this work locally?

bobbyiliev

Mar 20th, 2025 02:13 AM

I will take a look and try to submit a PR. Do you think that it is ok to:

  • Redirect to the /verify page for users who sing up with email
  • Skip that redirection for social logins

Or do you envision another workflow?

produkt

Mar 20th, 2025 02:56 AM

Yes that is what I expected the behavior to be.