简体   繁体   English

混合应用程序,远程自动登录

[英]Hybrid app, remote auto login

I am developing a cross platform app for iOS and Android. 我正在为iOS和Android开发跨平台应用程序。 It is a hybrid app where the login page is native to the app and once the user is logged in, the inAppBrowser opens the users homepage. 它是一个混合应用程序,其中登录页面是该应用程序的本机,一旦用户登录,inAppBrowser便会打开用户主页。 The mobile login page is meant to be a substitute for the website login page. 移动登录页面旨在替代网站登录页面。 The website has complete authentication and DB connectivity, so this doesn't need to be implemented in the app. 该网站具有完整的身份验证和数据库连接,因此不需要在应用程序中实现。 Currently what I'm trying to do is, read the user entered data on the mobile login and post it to a php page and then trying to auto fill the website form with the user entered data and auto log in to the website so that the very next page the user sees is their logged in homepage in the inAppBrowser. 目前,我正在尝试做的是,在移动登录中读取用户输入的数据,并将其发布到php页面,然后尝试使用用户输入的数据自动填写网站表单,然后自动登录到网站,以便用户看到的下一页是他们在inAppBrowser中登录的首页。

I am using intel XDK for this project which uses HTML5 and cordova. 我正在为使用HTML5和cordova的项目使用intel XDK。

Can someone tell me if my approach is right or wrong? 有人可以告诉我我的方法是对还是错? and if you can think of a better way to solve this, please let me know. 如果您能想到解决此问题的更好方法,请告诉我。 Any suggestions on the technologies I can use are welcome too! 我也欢迎对我可以使用的技术提出任何建议! Thanks. 谢谢。

I am not very clear.. though if I got it right.. 我不太清楚..虽然我做对了..

You have a PHP page, where you might have a <form /> with input username and password as you said and posting that data to server on click on website. 您有一个PHP页面,您可能会在其中有一个<form /> ,其中包含您所说的输入用户名和密码,并将该数据发布到网站上的服务器上。 Just catch hold of that action URL of <form />' and do the same thing from Android screen setting POST parameters as similar content type form-data` or something. 只需抓住action URL of <form />' and do the same thing from Android screen setting POST parameters as similar content type form-data`即可。

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

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