Answer the question
In order to leave comments, you need to log in
How to authorize a user from a social network if he does not have an email address?
Hello. PHP 7.0, Laravel 5.2. I use Socialite to log into the site through social networks. If there is no email specified in the social network account, I return an error. Can I get a phone somehow?
Answer the question
In order to leave comments, you need to log in
And why do you need to get something from the social network in an imperative form? It is enough to get a user ID from Socialite on the network and, based on it, create an account or attach it to an existing one if the person is already logged in. All other data can be requested from a person directly if the social network does not want to share them. For example, using middleware, check whether the user has all the data, in case of an incomplete profile, display a page with a filling form.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question