coderello / laravel-passport-social-grant

🔒 API authentication via social networks for your Laravel application
https://packagist.org/packages/coderello/laravel-passport-social-grant
MIT License
174 stars 20 forks source link

This package does not work for apple socialite provider #41

Closed ramanath-codeclouds closed 3 years ago

ankurk91 commented 3 years ago

Can you paste the link to that package.

Do you see any errors?

ramanath-codeclouds commented 3 years ago

Apple provides email and name for the first time sign in. userFromToken method basically fetch the user if we already have the token, that means at first attempt apple already provided the name and email. userFromToken will fetch only email at this instance. But I need email and name both here. Do we have any workaround here so that within request params we'll get the name params as well inside resolveUserByProviderCredentials method?

ramanath-codeclouds commented 3 years ago

https://socialiteproviders.com/Apple/ link to the apple socialite provider.

ramanath-codeclouds commented 3 years ago

I'm also using

Can you paste the link to that package.

Do you see any errors?

This package has no error, it just does not comply with all other sign in type.

ankurk91 commented 3 years ago

This package does not force you to use socialite. This package lets you leverage existing installed passport package.

This package exposes an api through the resolveUserByProviderCredentials method and you (developer) suppose to resolve the user from database anyhow.

If Apple does not send you the name and email both from token, it is apple auth API limitations, not this package.

You can save user name and email in database during first login attempt and use the email address to find the user from database on next attempt.