laravel-sign-in-with-apple
laravel-sign-in-with-apple copied to clipboard
Name and Surname
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
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
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"])
// ...
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.
hmmm, that is odd ... I will have to test this again.
I have the same issue when I use it like this: Socialite::driver('sign-in-with-apple')->userFromToken($data['access_token']);
This the user objected returned, I submitted the request with the scopes name and email.
