Integrating SkyChat with mobile numbers


#1

Question from a user -

I want to integrate SkyChat with my existing app, however, my app requires only mobile number to login, where Skygear requires username/email password for authentication.

If I am to use mobile numbers as usernames, any advice on the following case:

If a user sells his mobile number to someone else, and the new owner uses that number to create a new account. Should the username in my system be 85299999-0, so that when the new owner create a new account, his username will be 85299999-1?


#2

It is doable.

However, I think it is more common if we just use the phone number as the username, and in the rare case where a user really got the phone no of an old user and need a new account, you can rename the old account’s username to sth like 85299999-0 as an admin in future


#3

wow thanks Ten for helping on this.

Actually I’m considering to use anonymous account for this case since the user can setup their username later also (like LINE/Telegram)

For anonymous user, is it possible to use the function skygear.auth.changePassword(currentPassword, newPassword) with a null currentPassword so that they can “add” a password afterwards?

And also is there anyway to know that if the currentUser has a password not?

Thanks


#4

@vkedwardli Currently you can’t “add” a password afterwards.

However, it sounds like a very valid case, so I have created an issue here to support your use case and if you have a deadline to catch let me know and I can see how to arrange it with our developers.