Skip to content

This code get the device's unique identifier, to firestore and used to check if the device has already been used to login. If the device has already been used, the login is successful. If the device has not been used, it is added to the list of devices associated with the user's account in Firestore.

License

Notifications You must be signed in to change notification settings

VikramadityaDev/OneDevice-OneLogin

Repository files navigation

OneDevice-OneLogin

This is just an demo for One login in One device functionality using Firebase Authentication, Firestore & Unique Identifier in Flutter.

Description

"One login in One device" is a security feature that allows a user to log in to an account from a single device at a time. If the user attempts to log in to the same account on a different device, the previous login session will be terminated, and the user will need to enter their credentials again to log in on the new device. This feature helps to prevent unauthorized access to an account and ensures that only the intended user has access to the account's information. It can be achieved by storing device unique identifier in firebase firestore and then checking every time user logins from a new device if the device is already registered or not. If it is already registered and user is already logged in on that device, then the new login request will be rejected.

Technologies

  • Flutter
  • Dart
  • Firebase Authentication
  • Firebase Firestore
  • Unique Identifier

About

This code get the device's unique identifier, to firestore and used to check if the device has already been used to login. If the device has already been used, the login is successful. If the device has not been used, it is added to the list of devices associated with the user's account in Firestore.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published