password_hash & salt with facebook authentication

AI-generated summary

When using Facebook authentication, the password_hash and salt fields in the database are still populated. will_io initially questioned what values from the Facebook API correspond to these fields, but discovered that even when users sign up with Facebook, a password_hash and salt are still generated. fantasticfears and fantasticfears clarified that the password is not set by the user, but rather can be reset by the user through their settings page. pfaffman explained that a single account can authenticate against multiple mechanisms, including local password, Google, or Facebook, as long as the email is the same. Hyan confirmed this behavior and noted that users can log in using either their OAuth2 provider credentials or their local password, set through the reset password function.

What in the facebook API becomes the password_hash and salt when a user signs up and authenticates using facebook?

They are remain empty.

I thought there was a portion of users who – if they have their facebook settings set a specific way – could possibly both authenticate using facebook and also set a password.

I think that’s my problem. Or I might have a different problem.

Either way I have a user with Facebook() as a login and a password_hash/salt in the db.

Edit: I just checked with a dummy facebook acct. A password_hash and salt are still being set at registration if I use facebook. So something on my end might be drastically wrong I just don’t know what.

I am not following.

It doesn’t matter at all. You don’t have chance to set password when using an OAuth services if they provide username and email.

The user can use their setting page to reset their password.

Users can authenticate against any of the available mechanisms. As long as the email is the same, a single account can authenticate against Google, Facebook, or a local password. Does that explain what you are seeing?

I had the same question. Why the password_hash (or salt) still set in DB for an account registered through OAuth providers (I use Discourse OAuth2 Basic plugin). My experiment proves that users are able to login (if one doesn’t disable “enable local logins” when OAuth2 is enabled and setup) through their local password that set through reset password functions in their preference panel. They can also login through their OAuth2 providers credentials. Both mechanisms are allowed as pfaffman said.

I’m curious what’s the initial raw value of password_hash?