Self contained login using HTML and/or Javascript

Akmedrah

I am looking at making an idle game that stores data server side(instead of cookies) and would like a simple way (no mysql or php preferably) to register and login using html5 and/or javascript. I am VERY new to programming and therefore have no example to show sorry. any help would be greatly appreciated!

Praveen Kumar Purushothaman

Disclaimer: I know it is stupid or a sin to answer this kind of question, but it is okay for an absolute beginner.

You have a lot of contradictory statements. First you said you wanna store it in the server side, but not PHP or MySQL (which is basically one of server side programs).

You are confusing Java and JavaScript. This is like equating Hamburger and Hamburg or Ham? Whatever. Java is not JavaScript. Please understand.

A solution for you is localStorage and using it, you can store and retrieve data for the particular session, the more or less almost same way how a server session works. You can use the following snippet to check if the user is logged in:

if (typeof Storage !== "undefined") {
  if (localStorage.getItem("user") != null)
    // User is logged in
  else
    // Redirect to login.
}

Please have a look about how to work with localStorage. This is ideal for Games, as they might need to go in and around pages and share information between them.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Self contained login using HTML and/or Javascript

From Dev

Fully self-contained HTML files with Pandoc

From Dev

Fully self-contained HTML files with Pandoc

From Dev

Vaadin (self contained) portlet (Liferay) with Javascript (d3js)

From Dev

Self Contained WPF .net

From Dev

How do you automatically Login to OWA 2013 using HTML + JavaScript

From Dev

Facebook login for Windows app using Javascript and html5

From Dev

Login with html using java

From Dev

login validations using javascript

From Dev

Mimic R CMD build HTML vignette: Embed external images as self contained

From Dev

Creating a self contained, offline HTML5 app and the best method for embedding its resources

From Dev

Creating a self contained, offline HTML5 app and the best method for embedding its resources

From Dev

Spring Boot/Angular app. routing a completely self contained HTML file

From Dev

Retrieving variables from HTML with JSON data contained in Javascript

From Dev

Retrieving variables from HTML with JSON data contained in Javascript

From Dev

Self-contained generic memento

From Dev

Self-contained shared library

From Dev

Self-Contained Linked List

From Dev

Snappy and self-contained programs

From Dev

Is allowing self contained xss on anchor elements safe (just blacklist javascript: properly)?

From Dev

Using lapply to fit multiple model -- how to keep the model formula self-contained in lm object

From Dev

Login page using HTML/CSS

From Dev

Login with Scrapy with site using Javascript

From Dev

A web crawler in a self-contained python file

From Dev

Ensuring that a maven build is self-contained

From Dev

completely self-contained virtual environment

From Java

Is a python virtual environment entirely self-contained?

From Dev

AngularJS self contained directives for designer use

From Dev

Pass self reference to contained object's function

Related Related

  1. 1

    Self contained login using HTML and/or Javascript

  2. 2

    Fully self-contained HTML files with Pandoc

  3. 3

    Fully self-contained HTML files with Pandoc

  4. 4

    Vaadin (self contained) portlet (Liferay) with Javascript (d3js)

  5. 5

    Self Contained WPF .net

  6. 6

    How do you automatically Login to OWA 2013 using HTML + JavaScript

  7. 7

    Facebook login for Windows app using Javascript and html5

  8. 8

    Login with html using java

  9. 9

    login validations using javascript

  10. 10

    Mimic R CMD build HTML vignette: Embed external images as self contained

  11. 11

    Creating a self contained, offline HTML5 app and the best method for embedding its resources

  12. 12

    Creating a self contained, offline HTML5 app and the best method for embedding its resources

  13. 13

    Spring Boot/Angular app. routing a completely self contained HTML file

  14. 14

    Retrieving variables from HTML with JSON data contained in Javascript

  15. 15

    Retrieving variables from HTML with JSON data contained in Javascript

  16. 16

    Self-contained generic memento

  17. 17

    Self-contained shared library

  18. 18

    Self-Contained Linked List

  19. 19

    Snappy and self-contained programs

  20. 20

    Is allowing self contained xss on anchor elements safe (just blacklist javascript: properly)?

  21. 21

    Using lapply to fit multiple model -- how to keep the model formula self-contained in lm object

  22. 22

    Login page using HTML/CSS

  23. 23

    Login with Scrapy with site using Javascript

  24. 24

    A web crawler in a self-contained python file

  25. 25

    Ensuring that a maven build is self-contained

  26. 26

    completely self-contained virtual environment

  27. 27

    Is a python virtual environment entirely self-contained?

  28. 28

    AngularJS self contained directives for designer use

  29. 29

    Pass self reference to contained object's function

HotTag

Archive