Authenticate by Device with Firebase

Viewed 2900

Sorry if this is a simple question.. but I can't seem to find a good answer for this.

I want to implement an anonymous login, where the user is simply logged in by their device. I am guessing that devices across iOS and Android don't have unique IDs.. so I guess I would have to manually generate an ID, and then see if its already in use, and then if it is regeneerate. Is there a solution to this sort of thing? my solution seems really hacky...

My current idea, logic wise is:

  • Generate Unique ID
  • Query database to see if Unique ID is already in use
  • If it is repeat first two steps
  • If not push up

I need to be able to track what Device has pushed what information to the database, but I don't want to make users have to sign in or provide any information.

1 Answers
Related