i am reposting this question from an earlier post since the nature of the question has changed.
it appears FB is supposed to log in using the standard code below but i am getting an error (below). i should think that the code SHOULD NOT need to be modified at all since i am able to log in successfully using both google and auth0. suggestions?
<?php
session_start(); // necessary ?????????????
require 'vendor/autoload.php';
use Auth0\SDK\Auth0;
$auth0 = new Auth0([
'domain' => 'dXXXXXXXXXX.auth0.com',
'client_id' => 'LXXXXXXXXXXX',
'client_secret' => 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
'redirect_uri' => 'https://XXXXXXXXXX.site/auth0/index.php',
'persist_id_token' => true,
'persist_access_token' => true,
'persist_refresh_token' => true,
]);
$userInfo = $auth0->getUser();
if (!$userInfo) {
//echo '<a href="login.php">Log In</a>';
$auth0->login();
// We have no user info
// See below for how to add a login link
} else {
printf( 'Hello %s!', htmlspecialchars( $userInfo['name'] ) );
// User is authenticated
// See below for how to display user information
}
here is the error i see when trying to use FB (note that google and oauth work fine with the php script above)
[Wed Oct 16 20:43:47.480765 2019] [php7:error] [pid 20488] [client 13.56.32.142:52059] PHP Fatal error: Uncaught GuzzleHttp\Exception\ClientException: Client error:
GET https://dev-y-wc5m4m.auth0.com/userinfo
resulted in a429 Too Many Requests
response:\nToo Many Requests\n in /var/www/html/auth0/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113\nStack trace:\n#0 /var/www/html/auth0/vendor/guzzlehttp/guzzle/src/Middleware.php(66): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Psr7\Request), Object(GuzzleHttp\Psr7\Response))\n#1 /var/www/html/auth0/vendor/guzzlehttp/promises/src/Promise.php(203): GuzzleHttp\Middleware::GuzzleHttp{closure}(Object(GuzzleHttp\Psr7\Response))\n#2 /var/www/html/auth0/vendor/guzzlehttp/promises/src/Promise.php(156): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), Array)\n#3 /var/www/html/auth0/vendor/guzzlehttp/promises/src/TaskQueue.php(47): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise{closure}()\n#4 /var/www/html/auth0/vendor/guzzlehttp/promises/src/Promise.php(246): GuzzleHttp\Promise\TaskQueue->run(true)\n#5 /var/www/htm in /var/www/html/auth0/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php on line 113