I assume that you are talking about a device identifier that Apple calls "UDID".
Using UDIDs for this purpose does not seem like a good idea to me. For your purposes, there is no difference between a UDID and any other 40-digit hexadecimal string. From the user's point of view, however, this is an immutable string that is not private and which is used as a backup for their username and password. Since any application can detect UDIDs, and UDIDs are provided to developers and other users, the security of your entire system will rely on nothing more than the unknownness of your hash algorithm.
It is possible to use the UDID as a stand for the username if you require the user to enter a password at the beginning of each session, because then at least there would be a private, mutable login component.
I donβt see the real advantage of using UDID compared to the random 40-digit hexadecimal string that you create in your application. The advantages of creating your own string, on the other hand, are that no other application can easily detect your string, and the user can (if you allow) change the string as desired.
Note. I am not a security expert, and I do not want to give the impression that I am. However, as a user, I would be nervous about using an application that uses the device identifier as you describe.
source share