php - What password to store in database when user registers through OAuth2 (Example: google or facebook)? -


i have web application permits user register though normal html form, or via facebook or google. question password should store in database, because if oauth provider gives me relevant information email, name, age, etc... obviously not give password. correct password store in database? have few ideas:

  1. generate random 1 , send through email (not secure)
  2. add empty string. (they never able login using password because on acceptin login request validate password should contain more 5 characters, sounds hacky way it)
  3. make compulsory fill in password after registering through oauth provider.

any thoughts?

it depends entirely on application. authentication going run through 3rd party - i.e. googleauth?

if is, there no need store password. if handle authentication in application give user option sign google/facebook or application.

i see 3rd party authentication better user experience because don't have register on site. in mind, if sign on site require password, if choose 3rd party authentication, don't store password.


Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -