简体   繁体   中英

Login and registration in HTML5 Hybrid App?

I am a front-end developer. I am implementing HTML5 Hybrid app with Phonegap. I have setup all these things for the App but I don't have backend knowledge but I want to first implement registration and login on my first page. I have implemented one apk and this apk working fine in my mobile, But after that, I want to implement validation. I don't know how it will possible but I am thinking about javascript for this( Registration is possible through javascript? ).Can we register form without backend programming Like Java or Php. Right now I am not using any DataBase. Give me the idea about Login what is the best thing. As per my thinking database is necessary. I am new in Hybrid app then please suggest me solution.

You could use Javascript at the server side with Node.js and Framewrok Express to handle requests from your mobile device in a RESTFUL API. For signing up your users is really neccesary a database, to store credentials which they'll authenticate in this case if you want to use technologies oriented to JS one option would be MongoDB. It's also recommendable use a Framework for your mobile app like Ionic which is based in Angular.js to accelerate your development.

Here a tutorial how you can achieve authenticate with some of tools I mentioned above:

https://scotch.io/tutorials/authenticate-a-node-js-api-with-json-web-tokens

There are also services like Auth0 (No affiliation but we use them for my company). Depends on how much you plan on scaling user count. If SaaS or low user count, their free plan is not bad.

I also wrote a blog on various strategies when it comes to securing APIs from an HTML 5 app Cookies vs Local Storage, etc if helpful. https://www.moesif.com/blog/technical/restful-apis/Authorization-on-RESTful-APIs/

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