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.
Asked
Active
Viewed 445 times
0
1 Answers
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
-
Thank you sir. This package is going to help me. Again thank you. :) – John Jul 24 '21 at 15:31
-
done. Actually I got another problem using device_info_plus. I have posted that question. Please have a look once. – John Jul 27 '21 at 08:20
-
I'll take a look and if I'll know the answer, I'll write to you. – Alex Mamo Jul 27 '21 at 08:21