开发者

Coldfusion: Share session between an iPhone APP and the webview with CFID and CFTOKEN

开发者 https://www.devze.com 2023-04-04 21:39 出处:网络
we are working on a mobile application for a dating site, mixing native views and web views. The user need to log in into the iPhone app.

we are working on a mobile application for a dating site, mixing native views and web views.

The user need to log in into the iPhone app. This is done with a webservice (WS). The WS checks the username/password in the database, then creates all the session variables and finally returns the CFID/CFTOKEN to the application.

But when the application try to call a web view including the CFID/CFTOKEN in the URL, the session is not set, and the user has to log in again in the webview... When he logs in again, then the session is created and stay active as usual.

Does I understand well the use of CFID/CFTOKEN ? How to handle the session between 2 applications?

Thanks for your time !


Thank you for your answers. As Jason said, the web views are within the iphone app and we are on ColdFusion 8 The process i need to develop is the followin开发者_高级运维g: 1 - the user open the app and fill in his credentials 2 - the app authenticates him with a webservice 3 - the session is created 4 - the user navigate through the application (wich is webservice-based, no problem here...) 5 - some parts (80%) of the screens of application are webviews (non-native). When the user goes to webviews, he needs to be logged in automatically.

My idea was to authenticate the user with the webservice, then returns the CFID/CFTOKEN to the app, and append it to the url of each web view. But this do not work, the user has to log in twice, once in the app, once in the webviews.

0

精彩评论

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

关注公众号