Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

Commit

Permalink
Merge pull request #613 from KuceraMartin/master
Browse files Browse the repository at this point in the history
FacebookRedirectLoginHelper - let's not regenerate CSRF token
  • Loading branch information
SammyK committed Aug 6, 2016
2 parents f7ca208 + 88a4a59 commit b44e2f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Facebook/Helpers/FacebookRedirectLoginHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public function getPseudoRandomStringGenerator()
*/
private function makeUrl($redirectUrl, array $scope, array $params = [], $separator = '&')
{
$state = $this->pseudoRandomStringGenerator->getPseudoRandomString(static::CSRF_LENGTH);
$state = $this->persistentDataHandler->get('state') ?: $this->pseudoRandomStringGenerator->getPseudoRandomString(static::CSRF_LENGTH);
$this->persistentDataHandler->set('state', $state);

return $this->oAuth2Client->getAuthorizationUrl($redirectUrl, $state, $scope, $params, $separator);
Expand Down

0 comments on commit b44e2f4

Please sign in to comment.