I am developing an organizer with tasks for the user that are stored and managed through the website. For the website, I am using ASP.NET MVC 4 and backbone.js. Now I want to create a mobile application using PhoneGap. The user will be able to log in / register, and then be able to manage their tasks using their phone / tablet on the go. So my problem is that I donβt know how to log in, and then how to get jobs from the server.
Now I am using backbone.js and I have api on the server that manages the tasks. My idea was to use only the same code (only html, css, js) from ASP.NET MVC, and it should work easily, but for this api the user should be registered, and for this, simple membership and web security that is used in the backend, which Iβm not going to use with the mobile version, and I'm not sure how the user will log in.
Another idea was to check the user credentials (with an AJAX request to the server, which can tell if the user has entered valid login information) to have their user ID on the phone (local storage or something like that), and then use api on a server that will not need a user to log into the system, and it will manage the tasks of the user (for which I pass the user ID). But I think it will be a huge security hole, because everyone can change tasks only with a user ID. I already found an example of logging in from Raymond Camden ( See here ), this idea may help, but this is only part of the logging in (and only logging in to the device, but the security issue that I talked about concerns me)
Therefore, I would be grateful if you would give me some ideas on how to implement login on the device and how to get data for the user from the server. I would really appreciate even conceptual ideas.
source share