开发者

iPhone app token session with the backend

I'm creating an iPhone app with a ROR 3 backend. I'm just wondering about the best practices with regards to u开发者_如何学Cser sessions and session tokens. I would like to design the app such that after an initial registration, the user is always logged in. Is this best done by saving the username and password in NSUserDefaults and automatically logging in behind the scenes when the app launches and using the generated token (stored in the delegate?) for all the operations.. and then basically every time the app launches, a new token is generated.

Or, upon the initial registration, save the token in NSUserDefaults and use that token with every launch?

Thank you and best regards!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜