parse-server icon indicating copy to clipboard operation
parse-server copied to clipboard

Reset password for a user that sign via Facebook

Open mmarshak opened this issue 9 years ago • 5 comments

I am using Parse Server 2.2.25, and it seems that if a user on the client sign up with Facebook. And later he go to any client app and ask for password reset, then Parse server send him a reset password link which is meaningless because his password is kept in Facebook. I would expect that he will get some error message saying that he can not reset his password because his account is own by Facebook. When the user open the link instead of his email address he get the username which is the Facebook id which look to him like a garbage.

Is there any way to intercept (via cloud code) the reset request and send him an error page saying that he can not reset to the password? I will think that this should be part of the basic Parse server reset password flow.

mmarshak avatar Jan 11 '17 15:01 mmarshak

My first crack at this was checking for the existence of data in authData to indicate whether the user signed up via another application. However, I would imagine when linking to an existing user through Facebook or Twitter for example, that field gets populated and wouldn't necessarily indicate whether that user signed up through Facebook/Twitter vs organically through Parse Server.

Is that thinking sound ?

jhamet93 avatar Feb 12 '17 15:02 jhamet93

I am looking an answer for this one too - is it ever possible to setup a password for user signed up with an oAuth?

ciekawy avatar Jan 11 '19 16:01 ciekawy

@ciekawy You could add email / password Auth to an account that initially signed up with Facebook.

TomWFox avatar Apr 03 '19 18:04 TomWFox

Parse generates a random username for users that signed up with Facebook. If your app allows to define a custom username after the Facebook signup, this user will still have no password so will not be able to log in via username/password, but only via Facebook. By allowing to reset the password on this user, he will be able to set a password for its account and so log in with username/password.

cjosepha avatar Oct 18 '20 13:10 cjosepha

I'm closing this as there are ways to allow a user to log in with email / password if they signed up with 3rd party auth:

  • If the user does not have an email address set: add in-app feature for auth-logged-in user to set email / password.
  • If the user has an email address set: add in-app feature for auth-logged-in user to set password or allow password reset link to be requested.

mtrezza avatar Jan 31 '21 10:01 mtrezza