{"id":17132591,"url":"https://github.com/alphapeter/socket.io-express","last_synced_at":"2025-04-13T07:56:05.785Z","repository":{"id":4606793,"uuid":"5750071","full_name":"alphapeter/socket.io-express","owner":"alphapeter","description":"socket io authorization using express session (express 3)","archived":false,"fork":false,"pushed_at":"2012-09-10T16:35:12.000Z","size":194,"stargazers_count":16,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-13T07:55:58.223Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/alphapeter.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-09-10T13:38:10.000Z","updated_at":"2017-06-26T21:25:12.000Z","dependencies_parsed_at":"2022-09-16T20:01:30.640Z","dependency_job_id":null,"html_url":"https://github.com/alphapeter/socket.io-express","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alphapeter%2Fsocket.io-express","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alphapeter%2Fsocket.io-express/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alphapeter%2Fsocket.io-express/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alphapeter%2Fsocket.io-express/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alphapeter","download_url":"https://codeload.github.com/alphapeter/socket.io-express/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248681490,"owners_count":21144700,"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-10-14T19:27:32.630Z","updated_at":"2025-04-13T07:56:05.738Z","avatar_url":"https://github.com/alphapeter.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# socket.io-express\n\n`socket.io-express` is a library for using express session for authorization of socket.io-connections.\nTested with socket.io 0.9.10 and express 3\n\n# usage\n``` js\n    express...\n    var express = require('express')\n    var RedisStore = require('connect-redis')(express);\n    var redisStore = new RedisStore( { host:config.redis.address, port: config.redis.port });\n    var cookieParser = express.cookieParser('supersecret');\n    app.configure(function(){\n    ... // your configurations\n    app.use(cookieParser);\n    app.use(express.session({store: redisStore}));\n    ... // your configurations\n    });\n\n    socket.io...\n\n    var authFunction = require('./socket.io-express.js').createAuthFunction(cookieParser, redisStore);\n    io.set('authorization', authFunction);\n\n\n# meta\n\nThere were a lot of inaccurate blog posts of how to use express (v.3) sessions with socket.io,\nso I created this simple library.\n\nPeter Klaesson","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falphapeter%2Fsocket.io-express","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falphapeter%2Fsocket.io-express","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falphapeter%2Fsocket.io-express/lists"}