F
F
freeeeez2017-07-17 17:59:37
Laravel
freeeeez, 2017-07-17 17:59:37

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

2 answer(s)
I
imhuman, 2017-07-17
@imhuman

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.

D
Dimonchik, 2017-07-17
@dimonchik2013

no authorization, only from contacts

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question