简体   繁体   English

在phonegap上添加具有登录名的用户

[英]add users with login on phonegap

Hello I am creating an app for phonegap on android and I wanted to see how I can make a user login section. 您好,我正在为android上的phonegap创建一个应用程序,我想看看如何进行用户登录部分。 This section should let them register with a username and password and enter their email or just login if they already have a username . 本部分应允许他们使用用户名和密码进行注册,然后输入电子邮件地址,或者如果他们已经具有用户名,则只需登录。 Also do I need a website to hold all of this data? 我还需要一个网站来保存所有这些数据吗?

Thanks! 谢谢!

you need to try things before coming to SO. 您需要先尝试一下,然后才能开始。

BUT to point you in the right direction. 但是可以为您指明正确的方向。

1) create a simple restFUL API that lets people sign up 1)创建一个简单的restFUL API,让人们进行注册

2) use Local storage to store that info on the users phone 2)使用本地存储将该信息存储在用户手机上

3) each time the app launches, do an ajax request to your server with the localstorage username and password 3)每次应用启动时,使用本地存储用户名和密码向服务器发出ajax请求

4) Let user do what ever. 4)让用户做任何事情。

It's really quite a simple process - as for your hosting question depending on what you see usage being... if your app is going to be getting a lot of traffic you should consider a cloud based solution. 这实际上是一个非常简单的过程-关于托管问题,具体取决于您看到的使用情况...如果您的应用将获得大量流量,则应考虑基于云的解决方案。 Amazon will let you quickly scale the app and automatically take care of load balancing, Heroku is also pretty good at this. 亚马逊将让您快速扩展应用程序并自动进行负载平衡,Heroku在这方面也非常擅长。 On the fly scaling as well.. Lastly getting a host like Bluehost is a good option - flexibility, and reliability - also a good price. 最后,还要进行扩展。.最后,选择像Bluehost这样的主机是一个不错的选择-灵活性和可靠性-也是一个不错的价格。

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

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