I am creating simple app of register and login, so I want my user to use his login id and password from only his device, he should not be able to use his login details from another device, if he try to login from another device app should not allow him to login. How do I achieve this in android studio ?
Asked
Active
Viewed 682 times
1
-
1Removed tag `android-studio` as this tag is for problems/issues related to the Android Studio product. Your question is a generic Android question. – David Wasser Jan 19 '22 at 07:51
1 Answers
2
To achieve this you would need to tie the user's credentials to a unique device. The client should generate a unique device ID and send that to the server along with the credentials. The server should store the unique device ID in its database for that user. If the user then tries to log in from another device, the unique device IDs would be different and the server could refuse the login.
David Wasser
- 93,459
- 16
- 209
- 274