0

In our application, we don't want the user to share their id with other friends to use their account due to which we want to restrict this behavior. Is there any idea to restrict the user so that they are active from only one device always? I would be really grateful if somebody help. Please.

Alex Mamo
  • 130,605
  • 17
  • 163
  • 193
John
  • 157
  • 8

1 Answers1

3

Is there any idea to restrict the user so that they are active from only one device always?

Sure you can. The simplest solution would be to store the device ID in Firestore. Once the user tries to authenticate, check the value from Firestore against the actual device ID. If you get a match, continue with the authentication process, otherwise, display a message, or do whatever you need.

Alex Mamo
  • 130,605
  • 17
  • 163
  • 193