New: Learn Statamic on Laracasts!

We've retired the forum in favor of GitHub Discussions.

New conversations can be started on GitHub. Existing conversations will remain for a while longer.

Head over to GitHub →

OAuth and unique emails.

Jeremy Hoover February 15, 2021 by Jeremy Hoover

I installed OAuth logins on my Statamic site. When a user logs in with a social account and they have created an account through email, an error is thrown on the server, because emails need to be unique.

Iā€™m trying to make things nicer for the user and give them a message that the email address on the account has been used, maybe even remind them of how which to use to login.

Does anyone have an idea of how I would approach this? I tried working with the AppServiceProvider register class. Ideally, I'd like to check for a user by email and return a redirect with a flash message if there is. But, that need to return User::make.

Yes, I already started similar thread started, but I'm approaching this a little differently now, so I made a new conversation.

Answered by Jeremy Hoover!
>>>>>>> Answered <<<<<<<
1 Reply
1 Follower