Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

oo7ml

macrumors 6502
Original poster
Jan 20, 2010
259
0
Hi,

I have just built a small messaging app where users sign up with their mobile number, and a verification code is then sent to their mobile.

As soon as a user enters their name on the Sign Up screen, the account is created and the status is set to ‘created’.

Once the enter their phone number, the account status is updated to ‘pending’.

As soon as the enter the verification code, the account status is set to ‘live’.



How should i handle the following case:

A user signs up and is live on the app. They use it for 1 week, sending and receiving messages. The user looses their phone, and downloads the app on their new replacement phone, however the mobile number is the same as their previous account.

What is the best option:

A - allow the user to sign up on multiple devices with the same number (does this mean push notifications will be sent out to all of the devices AND all data will be downloaded to two devices)
B - make the mobile number unique and destroy all the previous data when a user enters a new mobile number AND verification code (if they have entered the verification code, then they obviously own the phone, so we should delete all previous data for this person)
C - any other suggestions

Thanks in advance for your help.
 
I would say a.

The user still has to verify their phone number when creating the new account

The other suggestion is, why not make it so the user can log into their old account if they get a new device instead of creating a new one?
 
Hi, thanks for your reply. My only worry with A is, that several phones could then access the same account.

I don't want to get users to create usernames and passwords... i want to keep the onboarding process very simple, similar to Whatsapp
 
The only way around the sending to two devices issue with A is to also, on account creation, snag a unique identifier for the device. It makes management perhaps difficult in the what if you mention. Someone gets a new phone, the unique ID will change, then what? How does the user update their account with the new phone data. Although having that unique ID for the device also adds security so that if someone clones the phone number, they can't get to the messages. I don't know what's available programmatically for the iPhone. IMEI? Serial number? Would it be worth the trouble on the backend?
 
The only way around the sending to two devices issue with A is to also, on account creation, snag a unique identifier for the device. It makes management perhaps difficult in the what if you mention. Someone gets a new phone, the unique ID will change, then what? How does the user update their account with the new phone data. Although having that unique ID for the device also adds security so that if someone clones the phone number, they can't get to the messages. I don't know what's available programmatically for the iPhone. IMEI? Serial number? Would it be worth the trouble on the backend?

Yeah good point. It's only an edge case, so i think it would probably be best to just delete all of their old data once they verify their number again and then just start them from new again (lose your phone, lose your data :)

They are only messages so it's not like it is really important information.

My only worry is, would there be a conflict if two+ live phones were using the same number, because all a user needs to do is receive the verification code, and they could do that multiple times over for several different phones... so would there be a problem.
 
A - allow the user to sign up on multiple devices with the same number (does this mean push notifications will be sent out to all of the devices AND all data will be downloaded to two devices)

No, push notifications are sent to individual devices, via the device token that you receive when the device registers for remote notifications.

Local and Push Notification Programming Guide
 
Ah ok cool so based on that, we should destroy all old data for previous number, and start fresh?
 
Ah ok cool so based on that, we should destroy all old data for previous number, and start fresh?

I guess it would depend on the time that the device is lost. I'd not take too kindly to having all of my data disappear because I lost my phone, but if it's spelled out up front that 'you lose, you lose', there shouldn't be any surprises. Maybe a few irate users, but...

You say 'previous number' and in your example you say that the number doesn't change. Confused...

If 'new' number is different, wipe the data. If 'new' number is same, give option to save?
 
Ah ok cool so based on that, we should destroy all old data for previous number, and start fresh?

You should use the feedback service to determine if you should continue attempting to send notifications to devices where the app no longer exists.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.