简体   繁体   中英

Hybrid app, remote auto login

I am developing a cross platform app for iOS and 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. 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.

I am using intel XDK for this project which uses HTML5 and cordova.

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. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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