FriendsOfSymfony / FOSFacebookBundle

NOT MAINTAINED - see https://github.com/hwi/HWIOAuthBundle
322 stars 140 forks source link

setFacebookId() should not overwrite salt #254

Closed drgomesp closed 11 years ago

drgomesp commented 11 years ago

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?

diegoholiveira commented 11 years ago

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

diegoholiveira commented 11 years ago

Can you submit a PR with the right documentation?