Skip to content

Commit b44e2f4

Browse files
authored
Merge pull request facebookarchive#613 from KuceraMartin/master
FacebookRedirectLoginHelper - let's not regenerate CSRF token
2 parents f7ca208 + 88a4a59 commit b44e2f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Facebook/Helpers/FacebookRedirectLoginHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public function getPseudoRandomStringGenerator()
122122
*/
123123
private function makeUrl($redirectUrl, array $scope, array $params = [], $separator = '&')
124124
{
125-
$state = $this->pseudoRandomStringGenerator->getPseudoRandomString(static::CSRF_LENGTH);
125+
$state = $this->persistentDataHandler->get('state') ?: $this->pseudoRandomStringGenerator->getPseudoRandomString(static::CSRF_LENGTH);
126126
$this->persistentDataHandler->set('state', $state);
127127

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

0 commit comments

Comments
 (0)