NicklasWallgren / PokemonGoAPI-PHP

Pokemon Go API PHP library
BSD 2-Clause "Simplified" License
130 stars 51 forks source link

Google Authentication Failing #8

Closed curt2008 closed 8 years ago

curt2008 commented 8 years ago

Fatal error: Call to a member function getAttribute() on null in /home/user123/public_html/files/PokemonGoAPI-PHP/src/Authenticators/GoogleOauth/Parsers/AuthenticationConfirmationInformationParser.php on line 56

When attempting to use your example

NicklasWallgren commented 8 years ago

I will redo the Google Authenticator in the next release.

NicklasWallgren commented 8 years ago

The GoogleAuthenticator has been re-implemented. Try it out :)

The-Hasanov commented 8 years ago
Fatal error: Uncaught exception 'NicklasW\PkmGoApi\Authenticators\Exceptions\ResponseException' with message 'Retrieved a invalid response from the server. Please try again later' in C:\OpenServer\domains\goapi\src\Authenticators\GoogleOauth\Parsers\Parser.php:56
Stack trace:
#0 C:\OpenServer\domains\goapi\src\Authenticators\GoogleOauth\Parsers\TokenParser.php(29): NicklasW\PkmGoApi\Authenticators\GoogleOauth\Parsers\Parser->validateResponse(Object(GuzzleHttp\Psr7\Response))
#1 C:\OpenServer\domains\goapi\src\Authenticators\GoogleOauth\Clients\AuthenticationClient.php(77): NicklasW\PkmGoApi\Authenticators\GoogleOauth\Parsers\TokenParser->parse(Object(GuzzleHttp\Psr7\Response))
#2 C:\OpenServer\domains\goapi\src\Authenticators\GoogleAuthenticator.php(53): NicklasW\PkmGoApi\Authenticators\GoogleOauth\Clients\AuthenticationClient->token(false, false)
#3 C:\OpenServer\domains\goapi\src\Authenticators\GoogleAuthenticator.php(26): NicklasW\PkmGoApi\Authenticators\GoogleAuthenticator->getToken(false, false)
#4 C:\OpenServer\doma in C:\OpenServer\domains\goapi\src\Authenticators\GoogleOauth\Parsers\Parser.php on line 56
NicklasWallgren commented 8 years ago

@The-Hasanov: Are you using the correct user credentials?

I have tighten up the exception response. Try the latest release.

The-Hasanov commented 8 years ago

response access your account, you must sign in on the web. Touch Next to start browser sign-in. i use sms verification

NicklasWallgren commented 8 years ago

Ah, we don't support 2-step authentication at this moment. Sorry.

curt2008 commented 8 years ago

Works perfect, thankyou