简体   繁体   中英

Uniquely and safely identify a user on iOS

I'm having an iOS app where I want users to rate specific things with a rating from 1 to 5. It is meant to work without login.

The thing is that I want to identify each user uniquely so that nobody can abuse the system and rate for the same thing twice and/or just spam the server with fake ratings.

So I need a identifier which is

  1. Unique (A user should not be rejected to vote because the system thinks he already voted)
  2. Recoverable after reinstall (To prevent "Reinstall and revote")
  3. Validatable (To prevent some mass requests to the server with some fake identifiers and just spam ratings)

I know that it is impossible! to make this safely and if some smart guy/girl really wants it, he can break the system. But I want some safe as possible system for me to identify the user. Also, it can break the whole system when someone starts to spam ratings and I can't control it.

Also I've thought about only asking the user for the e-mail and generate a password from the device. So the user only has to input his E-Mail address and then the device is connected to that e-mail address. Maybe using the MAC-Address? But then again this one is changeable, too.

I know that the following attributes will not work:

Identifying anonymous users did not help me really.

So what can I try to use? A combination of all of these? Is there some guide on how to calculate these kind of authentication-tokens?

Answers like "Nobody will try to hack your app you retard" or "Your app sucks anyway" are not welcome, since this is also a scientific question.

You can send Vendor ID along with the ratings of that user. If any user rates, try to check in database server whether this Vendor ID exists or not. If exists, promote message that "You already rated". In short, you can use Vendor ID to uniquely identify particular user.

Here is how you can get Vendor ID:

NSString *udid = [[[UIDevice currentDevice] identifierForVendor] UUIDString];

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM