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

Handle of oAuth response with error. #34

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

defragmentator
Copy link

To prevent:
InvalidArgumentException: $user must be an instanceof UserInterface, an object im
plementing a __toString method, or a primitive string. (uncaught exception) at /vendor/sy
mfony/security/Core/Authentication/Token/AbstractToken.php line 94 {"exception":"[object](InvalidArgumentException%28code
: 0%29: $user must be an instanceof UserInterface, an object implementing a __toString method, or a primitive string. at/vendor/symfony/security/Core/Authentication/Token/AbstractToken.php:94)"} []

Caused by oauth returned Error instead of user data like this:

array('error' => array('message' => 'Invalid OAuth access token.', 'type' => 'OAuthException', 'code' => '190', 'fbtrace_id' => 'HZmpbcgRi1l'))

To prevent:
 InvalidArgumentException: $user must be an instanceof UserInterface, an object im
plementing a __toString method, or a primitive string. (uncaught exception) at /vendor/sy
mfony/security/Core/Authentication/Token/AbstractToken.php line 94 {"exception":"[object] (InvalidArgumentException(code
: 0): $user must be an instanceof UserInterface, an object implementing a __toString method, or a primitive string. at/vendor/symfony/security/Core/Authentication/Token/AbstractToken.php:94)"} []

Caused by oauth returned Error instead of user data.
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

Successfully merging this pull request may close these issues.

1 participant