简体   繁体   English

在Android / iPhone应用和网络之间连接登录流程

[英]Connecting the login flow between Android/iPhone app and the web

When the person opens my app, I want to display a button. 当该人打开我的应用程序时,我要显示一个按钮。 The user clicks this button, and it opens a browser (embedded, of course) inside the app, allowing the user to LOGIN through that web page. 用户单击此按钮,它会在应用程序内部打开一个浏览器(当然是嵌入式的),允许用户通过该网页登录。

Of course, when the person logs in, it only logs in to that web server . 当然,当该人登录时,它仅登录到该Web服务器 The web service now knows that the user is logged in. 现在,Web服务知道用户已登录。

As the user uses my mobile app, I need to know if he's logged in or not. 当用户使用我的移动应用程序时,我需要知道他是否已登录。 How can I know? 我怎么知道? There's no way for my app to determine if the user is logged into my web service. 我的应用无法确定用户是否登录到我的Web服务。

By the way, I am using Django framework for my web service. 顺便说一下,我将Django框架用于我的Web服务。

Well, presumably when your user logs in the server is telling their browser to set a cookie. 好吧,大概是您的用户登录服务器时告诉他们的浏览器设置cookie。 Why not just capture this cookie and use it to determine if they successfully logged in? 为什么不仅仅捕获此cookie并使用它来确定他们是否成功登录?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM