{"id":18820695,"url":"https://github.com/valentinfunk/firebase-steam-login","last_synced_at":"2025-04-13T23:34:15.409Z","repository":{"id":76050113,"uuid":"96041701","full_name":"ValentinFunk/firebase-steam-login","owner":"ValentinFunk","description":"Login to firebase with Steam OpenID","archived":false,"fork":false,"pushed_at":"2018-04-09T08:22:57.000Z","size":112,"stargazers_count":24,"open_issues_count":0,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-27T14:08:22.062Z","etag":null,"topics":["discord","firebase","microservice","oauth2","steam"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ValentinFunk.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-02T18:29:52.000Z","updated_at":"2025-01-27T23:09:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"3b2c4d73-95d4-4192-bbf7-16a8834d0a40","html_url":"https://github.com/ValentinFunk/firebase-steam-login","commit_stats":null,"previous_names":["valentinfunk/firebase-steam-login"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ValentinFunk%2Ffirebase-steam-login","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ValentinFunk%2Ffirebase-steam-login/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ValentinFunk%2Ffirebase-steam-login/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ValentinFunk%2Ffirebase-steam-login/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ValentinFunk","download_url":"https://codeload.github.com/ValentinFunk/firebase-steam-login/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248797950,"owners_count":21163215,"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":["discord","firebase","microservice","oauth2","steam"],"created_at":"2024-11-08T00:29:32.597Z","updated_at":"2025-04-13T23:34:15.385Z","avatar_url":"https://github.com/ValentinFunk.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Steam -\u003e Firebase token generator\n\n1) Enables users to log in via steam, then redirects passing a firebase auth token as query (via ?token=blabla).\n2) Users can link their Discord app to their steam account.\n\n**Questions? Suggestions?**: Open an issue here or join Discord: https://discord.gg/3hVMYH3\n\n## Running\n\nDev: ``yarn dev``\nProd: ``yarn start``\n\nIn your consuming app redirect the user to to /auth/steam?client_id=\\\u003cclientId\\\u003e. ``clientId`` needs to be configured in the CLIENTS environment variable (see below).\n\n## Configuration\n\nCopy .env.example to .env and fill in custom values.\nFIREBASE\\_SERVICE\\_ACC is a firebase service account as json.\nCLIENTS is json in the format { clientId: redirectUrl }\n\n### Example:\n\nYou have configured ```CLIENTS['my-app'] = 'https://yourdomain.com/login_return'```. You redirect the user to ```https://firebase-steam-login/auth/steam?client_id=my-app```. After the login is finished the user will be redirected to ```https://yourdomain.com/login_return?token=aehcndb3u584...```. If the login fails they are redirected to ```https://yourdomain.com/login_return?code=error/code```.\n\n\n## Deploying to Firebase Functions\n\nMake sure the project is set up as firebase project by running ```firebase init```\n\nNext fill all configuration variables. Firebase functions does not use environment variables but instead the functions.config() object. To configure it convenienty create a new JSON file in the following format. (To generate a private/public key pair you can use ssh-keygen):\n\n```json\n{\n  \"steam-login\": {\n    \"discord\": {\n      \"client-id\": \"client-id\",\n      \"client-secret\": \"client secret\"\n    },\n    \"clients\": {\n      \"my-app\": \"https://my-app.com/login_return\"\n    },\n    \"jwt-config\": {\n      \"jwt-secret\": \"-----BEGIN RSA PRIVATE KEY-----\\n...\\n-----END RSA PRIVATE KEY-----\\n\",\n      \"jwt-public\": \"-----BEGIN PUBLIC KEY-----\\n...\\n-----END PUBLIC KEY-----\\n\"\n    },\n    \"session-secret\": \"some random string\",\n    \"steam-api-key\": \"steam api key\",\n    \"root-url\": \"root url (e.g. https://my-app.com\",\n    \"firebase\": {\n      \"client_id\": \"afssdaf\",\n      \"THIS IS YOUR FIREBASE SERVICE ACCOUNT\": \"FROM https://console.firebase.google.com/project/_/settings/serviceaccounts/adminsdk\"\n    }\n  }\n}\n```\n\nPipe the json to the config generator: ```cat config.json | node json-to-firebase-config.js```\n\nDeploy the function: ```yarn deploy:firebase```\n\nYou can then use all of the endpoints against that function. (https://us-central1-project-id.cloudfunctions.net/firebaseSteamLogin/auth/steam?client_id=my-app)\n\nNote: At the moment we cannot use functions.config().firebase as the credentials do not support signing tokens (see also https://stackoverflow.com/questions/42717540/firebase-cloud-functions-createcustomtoken/42724251#42724251)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalentinfunk%2Ffirebase-steam-login","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvalentinfunk%2Ffirebase-steam-login","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalentinfunk%2Ffirebase-steam-login/lists"}