The app should allow users to signup using both local login and also from other platforms like facebook or google. The Users table has a required password field. If an Users signup using the local registration form he/she will fill in the required password field. But what if the User opts to use facebook to signup to the app? In that case the required password field will not have any value to store and it will fail to register a new user. How should the Users table be designed to handle such issue?
I'm going to be stating the obvious here:
- It is recommended to make
passworda required field if a user is required to have a password
- It is not recommended to make
passworda required field if a user is not required to have one
Users authenticating through third party services do typically not input a password for you to register, so you do not have one to store.
You could require them to input a password upon registration when they authenticate through a third party service, but personally I fail to see the point in using third party service for authentication if that's the way you deal with it.
The actual bottom line here is that in some use cases generic recommendations are not applicable, you'll have to discern the criteria and business rules in place to determine what the best approach in your case is. Perhaps you have very good reasons to require a password to be stored with you despite using third party authentication and then you should do so.