{"id":20912482,"url":"https://github.com/fogleman/loginserver","last_synced_at":"2025-05-13T08:30:55.155Z","repository":{"id":13067316,"uuid":"15747893","full_name":"fogleman/LoginServer","owner":"fogleman","description":"Online multiplayer game login server for secure user authentication.","archived":false,"fork":false,"pushed_at":"2022-11-19T07:36:20.000Z","size":276,"stargazers_count":24,"open_issues_count":3,"forks_count":14,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-01T20:12:25.646Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://craft.michaelfogleman.com/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fogleman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-01-08T20:56:35.000Z","updated_at":"2025-02-16T13:06:15.000Z","dependencies_parsed_at":"2023-01-11T18:29:18.180Z","dependency_job_id":null,"html_url":"https://github.com/fogleman/LoginServer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fogleman%2FLoginServer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fogleman%2FLoginServer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fogleman%2FLoginServer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fogleman%2FLoginServer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fogleman","download_url":"https://codeload.github.com/fogleman/LoginServer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253903643,"owners_count":21981727,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-18T14:27:38.087Z","updated_at":"2025-05-13T08:30:54.862Z","avatar_url":"https://github.com/fogleman.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Login Server\n\nOnline multiplayer game login server for secure user authentication. Written in Python using Flask.\n\nhttps://craft.michaelfogleman.com/\n\n### Architecture\n\n![Diagram](http://www.michaelfogleman.com/static/img/login_server.png)\n\n### User Registration\n\n   * The user visits the web front-end of the login server to register for a new account.\n   * After registering and logging in, the user can manage “identity tokens.”\n   * The user creates an identity token which is copied and pasted into the game client.\n   * The game client saves the username and identity token to use for future logins.\n   * An identity token looks like: `717e3c1a034247ef91e6b78dd8088b77`\n   * The user can revoke any identity token at any time. The identity tokens are more secure than regular passwords and the user doesn’t need to reuse or make up a new password.\n\n### Login Process\n\n   * Game Client contacts Login Server over secure HTTPS.\n   * Game Client sends stored username and identity token to Login Server.\n   * Login Server checks for matching identity token in database (they are salted and hashed just like passwords).\n   * If the identity token is valid, the Login Server creates a new, short-lived access token. This is sent back to the Game Client.\n   * The Game Client sends the access token to the Game Server (this connection is plain text because we don’t need / want encrypted communication for game play). Access tokens can only be used once and expire in one minute.\n   * The Game Server sends the access token to the Login Server to verify the client's request to authenticate.\n   * If the access token is valid, unexpired and unused, the Login Server confirms a successful login and sends user information to the Game Server, such as a distinct user ID.\n   * The Game Server can then use the user information as needed. The user is now logged in.\n\n### Implementation Details\n\n   * The Game Client is written in C. It uses libcurl to easily perform HTTPS POSTs to the Login Server. It uses plain sockets for communication with the Game Server.\n   * The Game Server is written in Python. It uses the requests module to communicate with the Login Server.\n   * The Login Server is written in Python and uses the Flask web framework.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffogleman%2Floginserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffogleman%2Floginserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffogleman%2Floginserver/lists"}