Patrik
Patrik

Reputation: 2247

Only allow specific iOS devices to view website

Is there any way to lock a web site to a specific iOS device?

For example, if I could use the UID so only users with a UID that i know can get to the site.

I could use username and password but I don't want my users to be able to share their account others.

I have thought of using cookies. Save a cookie when the user logs in for the first time and if he tries to log in on another device it wont work because I've programmed it to only save a cookie for each account.

But is there a better way?

Upvotes: 4

Views: 592

Answers (4)

xcstream
xcstream

Reputation: 216

post udid with a mobileconfig. like http://whatisyourudid.com

Upvotes: 0

Wilber
Wilber

Reputation:

Developing a native application for iPhone is tbe best possible solution for this issue. By this way, you can check the uuid and confirm that the authenticated user logs in from the same device. I do not find any alternative way to do this authentication at web end.

Upvotes: 4

Deepu S Nath
Deepu S Nath

Reputation: 1184

Using Cookies is not a feasible solution for this issue. If the user clears the cookies or restart the device, he lose access to the site. Further, we cannot get UID using javascript. If you are in a stage where you could not move forward unless you get a solution, I can suggest you one.

You should thing of implementing a native application which authenticate the user and allow access to the web. By this, you can verify the UID to make sure that is accessed from a specific device.

Hope this helps.

Every problem has (n+1) solutions, where n is the number of solutions that you have tried and 1 is that you have not tried. :)

Upvotes: 2

cutsoy
cutsoy

Reputation: 10251

No you can't. Due to privacy-issues you cannot request the device UDID using Javascript (nor do you get it in a HTTP-header). You could try blocking all IPs except some, but that won't work that good, so you probably can't.

Upvotes: 2

Related Questions