开发者

iPhone app token session with the backend

开发者 https://www.devze.com 2023-03-08 06:52 出处:网络
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

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

精彩评论

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

关注公众号