Jump to content

Search the Community

Showing results for tags 'ingame'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 1 result

  1. Danidre

    In-Game Login API

    Newgrounds.io allows anyone to incorporate a login system to their game. From what I understand, they login to their newgrounds account, directly in the game, and they can even have that game on their own website. In other words, they do not need to upload the game to newgrounds, yet they can still be authenticated from Newgrounds. I assume an API is used, but I'm not sure how. If cookies are stored locally, or if JWT Tokens are used. I have a multiplayer game which works using 2 separate programs: The server is run using Node.JS hosted by Heroku The client is run on a static site hosted by Netlify (it's a single page JS Canvas game) The connection is made possible using Socket.io My problem: I want the client to be able to click a button (sign in) enter their unsername and password, and submit; thus making a request over to the server, for authentication. There, the server will verify if that information is correct, and grant that user access (which would be used for saving that user's character data or inventory items). However, how do I handle...authorizing that same user if they refresh the page? How would the server know that that browser is that same computer; that same user. How would that JS static site know to check if it was logged in, or if it needs to log in? Cookies or something? JWT Tokens rings in my head, but I don't have much knowledge to say for sure if that would work. Lastly, how would I send the requests to the API? Using a socket.emit? Or should I use a fetch or axios call to the server from the static site? Then that'll lead to questions such as how to allow requests from that one specific static site, because I know of things like CORS that prevents cross...requests (or something of that sort) I would really appreciate if anyone can help in this discussion, and if they can also link to where I can find discord servers or forums that are targeted to these questions. Since it seems to me like there's a silence in information such as these, and I've been researching for months figuring out everything on my own.
×
×
  • Create New...