FriendsOfSymfony / FOSFacebookBundle

NOT MAINTAINED - see https://github.com/hwi/HWIOAuthBundle

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

setFacebookId() should not overwrite salt

drgomesp opened this issue · comments

On the documentation regarding the FOSUserBundle integration, the custom provider has a method called setFacebookId(), like this:

    public function setFacebookId($facebookId)
    {
        $this->facebookId = $facebookId;
        $this->setUsername($facebookId);
        $this->salt = '';
    }

But in order for the integration to work properly, this method cannot overwrite the salt, otherwise the user will never be able to login using the username and password combination again.

The correct way is this:

    public function setFacebookId($facebookId)
    {
        $this->facebookId = $facebookId;
        $this->setUsername($facebookId);
    }

Should we update the docs or just add this custom provider to the bundle?

IMo, we should update the docs only. I don't think that we should include custom providers on this bundle.

Can you submit a PR with the right documentation?