Mobile Number as JID

Hi,
I am exploring option to have mobile number as jid in my chat app similar to whatsapp. But I am bit baffling how to handle below things

1) what could be password to login? if mobile client uses randomly generated password on first registration then it will be difficult to extract same password if he switch mobile.

2) If user switch number then how to retain old roaster and messages with new jid?

Can you someone through light on this so that I will explore more. thanks a lot for you help in advance.

Syndicate content