Welcome Guest, Not a member yet? Register   Sign In
Phonegap app to use existing Codeigniter & Ion auth backed, how to handle authentication?
#1

[eluser]devha[/eluser]
I already have CRUD Codeigniter application which uses Ion Auth for user authentication.

Now Im building small mobile app using Phonegap & jQuery mobile which uses this same backend. Im my Codeigniter backend I have one controller which handles all these ajax requests from mobile app. This way I can use my existing models etc.


But how should I handle user authentication for mobile app?

Im planning something like this:
- From client send username & pass to server
- Return session id back to client from server
- Store session id to client (local store)
- Send that session id in each requests to server and validate it in serverside.

How to do this in Codeigniter side? For login, I can use Ion Auth login methods and get session id. In second request when user send some actual data together with sessoin id, how to validate the session id?

All ideas and suggestions are more than welcome!


#2

[eluser]tlloyduk[/eluser]
Did you find a solution to this? I am looking to do a very similar thing..... Thanks




Theme © iAndrew 2016 - Forum software by © MyBB