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

Error while getting user via access token #25

Closed
tberk opened this issue Aug 18, 2020 · 1 comment
Closed

Error while getting user via access token #25

tberk opened this issue Aug 18, 2020 · 1 comment

Comments

@tberk
Copy link

tberk commented Aug 18, 2020

I successfully receive access token using firebase from my app but after sending it to my api server errors occur.

$providedUser = Socialite::driver($driver)->stateless()->userFromToken($accessToken);

This code is working for google, facebook, linkedin but throws error for apple.

[2020-08-18 11:55:32] production.ERROR: Argument 1 passed to GeneaLabs\LaravelSignInWithApple\Providers\SignInWithAppleProvider::mapUserToObject() must be of the type array, null given, called in /var/www/vhosts/******.com/vendor/laravel/socialite/src/Two/AbstractProvider.php on line 231 {"exception":"[object] (TypeError(code: 0): Argument 1 passed to GeneaLabs\\LaravelSignInWithApple\\Providers\\SignInWithAppleProvider::mapUserToObject() must be of the type array, null given, called in /var/www/vhosts/******.com/vendor/laravel/socialite/src/Two/AbstractProvider.php on line 231 at /var/www/vhosts/******.com/vendor/genealabs/laravel-sign-in-with-apple/src/Providers/SignInWithAppleProvider.php:100)
[stacktrace]
#0 /var/www/vhosts/******.com/vendor/laravel/socialite/src/Two/AbstractProvider.php(231): GeneaLabs\\LaravelSignInWithApple\\Providers\\SignInWithAppleProvider->mapUserToObject()
#1 /var/www/vhosts/******.com/app/Http/Controllers/Api/App/AuthController.php(134): Laravel\\Socialite\\Two\\AbstractProvider->userFromToken()

Edit: used idToken instead of access_token now it works.

@mikebronner
Copy link
Owner

@tberk Can you try release 0.4.4 and see if it works for you? Please let me know. :) Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants