Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Identify device by using an unique identifier flutter / android

My use case is I want to uniquely identify my users devices as I want to provide them subscription and dont want to use any type of login instead use an unique identifier that I can save it on my backend so even if user uninstall or reinstall my app, still be able to access content. Also I've had tried to use androidId (SSAID) but it can change on app signin change or device reset. I am using firebase as backend and flutter on front end.

like image 390
Crate Avatar asked Nov 07 '22 04:11

Crate


1 Answers

You can use the library below in order to find the device's unique ID:

Device ID library

Also this is a duplicate question, so please take care next time to search for the answer prior to asking a question. :)

Lastly, I am not entirely sure of the scope of your project but if you saving user data, sensitive or not on Firebase, logging people in with the devices UID's could be problematic for example in the situation of the user losing their phone they would not be able to recover their lost data. Like I said I'm not sure the scope of your project but just something to think about.

Please let me know if you need any further help!

like image 147
MattTheXPat Avatar answered Nov 15 '22 04:11

MattTheXPat