Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Name and Surname #46

Open
markonikolicdir opened this issue Jun 10, 2022 · 8 comments
Open

Name and Surname #46

markonikolicdir opened this issue Jun 10, 2022 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@markonikolicdir
Copy link

Hello,

I am using this lib and it is working very good but missing data about user when user logging from mobile app.

I saw in method mapUserToObject that you are taking from the request firstName and lastName.

Is only solution for this to grab it from mobile app?

In Apple doc I didn't find firstName or lastName.

https://developer.apple.com/documentation/sign_in_with_apple/sign_in_with_apple_rest_api/authenticating_users_with_sign_in_with_apple

@kitro
Copy link

kitro commented Oct 4, 2022

The same issue I have when I try to get the name from the user object.

$user = Socialite::driver("sign-in-with-apple")->user();
dd($user->getName()); // is empty

@mikebronner
Copy link
Owner

i belive you have to add the scopes, which is mentioned on the readme. Did this not work?

Socialite::driver("sign-in-with-apple")
            ->scopes(["name", "email"])
            // ...

@kitro
Copy link

kitro commented Oct 4, 2022

i belive you have to add the scopes, which is mentioned on the readme. Did this not work?

Socialite::driver("sign-in-with-apple")
            ->scopes(["name", "email"])
            // ...

Thank you for your reply, I tested with and without the scopes when I try to get the name is always null.

@mikebronner
Copy link
Owner

hmmm, that is odd ... I will have to test this again.

@mikebronner mikebronner added the bug Something isn't working label Oct 4, 2022
@mikebronner mikebronner self-assigned this Oct 4, 2022
@somarkn99
Copy link

I have the same issue when I use it like this:
Socialite::driver('sign-in-with-apple')->userFromToken($data['access_token']);

@kitro
Copy link

kitro commented Oct 19, 2022

This the user objected returned, I submitted the request with the scopes name and email.
image

@momar3632
Copy link

I have the same issue when I use it like this:
Socialite::driver('sign-in-with-apple')->userFromToken($data['access_token']);

@d-spaczynski
Copy link

Similar problem, Im getting name/email as nulls, even after I clear the app from my apple account, so it is the first time login ever.
Im retrieving user data with: $user = Socialite::driver("sign-in-with-apple")->user();

Anyone managed to get those data?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants