Add password login after oauth

Regarding this doc:

At the very bottom, #3, it says ‘“reset the user’s password” action’ - there is no such action that I can see. Has this changed? Is there a new way to give the user a password when logged into using oauth first? I also tried giving a temp password and it didn’t work either. I also tried signing up the user while logged in and I just get 2 users instead.

You can add any login method to the Current User by logging them in again using that method. This sounds odd, I know. It works as described here:

One thing I did not point out in that post reply: Can we know if Current User has only an OAuth style login? Yes we can. The User object has a property called “uses password”. It is true if… well… that User can use an email/password combo to log in. It is false otherwise:

Doesn’t work. I tried signing up the user while logged in and it only creates second account. Also, “uses password” is true if the user has email, that is it. If you add an email to the current user the “uses password” returns “yes”, even if there is no password (oauth only still since you can not login without a password). The reason it doesn’t work is because I selected to “not share email” when connecting Facebook. Many users do that for privacy reasons, so your method will fail. I found a better way.

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.