diff --git a/example/index.php b/example/index.php index 7b6255d38..6a656fffb 100644 --- a/example/index.php +++ b/example/index.php @@ -62,7 +62,6 @@ } $provider = $service->getProvider($providerName); - $provider->useState(); header('Location: ' . $provider->makeAuthUrl()); } catch (\Exception $e) { diff --git a/src/Provider/AbstractBaseProvider.php b/src/Provider/AbstractBaseProvider.php index 36e3c38e4..f6d8cd39e 100644 --- a/src/Provider/AbstractBaseProvider.php +++ b/src/Provider/AbstractBaseProvider.php @@ -36,13 +36,6 @@ abstract class AbstractBaseProvider */ protected $redirectUri; - /** - * Nonce/State to protect CSRF - * - * @var string|null - */ - protected $state; - /** * @var SessionInterface */ @@ -176,22 +169,4 @@ public function getConsumer() { return $this->consumer; } - - /** - * @param null|string $state - */ - public function setState($state) - { - $this->state = $state; - } - - /** - * @return string - */ - public function useState() - { - return $this->state = md5( - mt_rand(0, PHP_INT_MAX) - ); - } }