Reputation: 923
I'm creating login and registration page in iOS using Parse.com. Now if a user is logged in in one device than same user is logging in in different device than the first logged in device should get logged out.
How to achieve this thing in iOS objective C?
Upvotes: 0
Views: 120
Reputation: 9942
You could create a "logged in"-token for each device, based on device id. When you log in as a user, the current device id is stored in this field.
Then, every time your app is opened, it performs a check against this device id. If the stored device id does not match the current device id, you log out the user.
Upvotes: 1