{"id":47965515,"url":"https://github.com/dariasmyr/sso","last_synced_at":"2026-04-04T10:34:51.173Z","repository":{"id":258370622,"uuid":"856031794","full_name":"dariasmyr/sso","owner":"dariasmyr","description":"A microservice for managing users and authentication across multiple apps","archived":false,"fork":false,"pushed_at":"2025-07-25T15:09:06.000Z","size":2187,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-25T19:27:48.975Z","etag":null,"topics":["authentication","grpc","jwt","microservice","session-management","sqlite"],"latest_commit_sha":null,"homepage":"","language":"Go","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/dariasmyr.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,"zenodo":null}},"created_at":"2024-09-11T21:40:54.000Z","updated_at":"2025-07-25T15:09:10.000Z","dependencies_parsed_at":"2024-11-05T20:24:33.111Z","dependency_job_id":"a02b48d2-d76f-402c-bf4e-71a538fd9aca","html_url":"https://github.com/dariasmyr/sso","commit_stats":null,"previous_names":["dariasmyr/sso"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dariasmyr/sso","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dariasmyr%2Fsso","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dariasmyr%2Fsso/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dariasmyr%2Fsso/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dariasmyr%2Fsso/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dariasmyr","download_url":"https://codeload.github.com/dariasmyr/sso/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dariasmyr%2Fsso/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31397054,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T10:20:44.708Z","status":"ssl_error","status_checked_at":"2026-04-04T10:20:06.846Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["authentication","grpc","jwt","microservice","session-management","sqlite"],"created_at":"2026-04-04T10:34:49.450Z","updated_at":"2026-04-04T10:34:51.167Z","avatar_url":"https://github.com/dariasmyr.png","language":"Go","readme":"# SSO\nThe SSO is an **open-source microservice** for managing users and authentication across multiple apps, so that client app could **authenticate users without storing passwords locally**. \n\nInspired by article: https://habr.com/ru/articles/774796/  \n\n![SSO Architecture](docs/architecture.png \"SSO Microservice Architecture\")\n\n### Key points:\n\n- **Authorization Flow**: The client application redirects users to the SSO authentication service, where they authenticate. After successful authentication, the user is redirected back to the client with an access token (JWT) and refresh token.\n- **Access Tokens \u0026 Refresh Tokens**: If the access token expires, a refresh token can be used to obtain a new access token without requiring the user to re-authenticate in SSO.\n- **Passwordless Authentication**: The client application never stores user passwords. Authentication is managed by the SSO service, which securely handles user credentials.\n\n## SSO Flow Diagram\n\n![SSO Flow](docs/flow.svg \"SSO Flow\")\n\n## Getting Started\n\n### Setup\nClone the repository:\n\n```bash\ngit clone https://github.com/dariasmyr/sso.git\ncd sso-microservice\n```\n\n## Configuration\nConfiguration files are located in `./config/`. Use `config_prod_example.yaml` as a template. \nThen you can modify `config_local.yaml` for local setups and `config_prod.yaml` for production.\n\n### Database and Migrations\nFor testing, a separate database is used with migrations applied from the `./tests/migrations` directory.\n\n## Install dependencies:\n\n```bash\nmake tidy\n# Or manually:\ngo mod tidy\n```\n\n## Build and Run\nBuild the service:\n\n```bash\nmake build\n# Or manually:\ngo build -o build/sso ./cmd/sso\n```\n\nRun the service (!Check the configuration file!):\n\n```bash\nmake execute\n# Or manually:\n./build/sso --config=./config/config_local.yaml\n```\n\n## Run database migrations:\n\nFor production or default environment:\n```bash\nmake migrations-run\n# Or manually:\n./build/migrator --storage-path=./storage/sso.db --migrations-path=./migrations --migrations-table=migrations\n```\n\nFor testing environment:\n```bash\nmake migrations-run MIGRATIONS_PATH=./tests/migrations STORAGE_PATH=./storage/sso-test.db\n# Or manually:\n./build/migrator --storage-path=./storage/sso-test.db --migrations-path=./tests/migrations --migrations-table=migrations\n```\n\n## Important Notes\n- Some variables in the Makefile are hardcoded, such as `MIGRATIONS_PATH=./tests/migrations` and `STORAGE_PATH=./storage/sso-test.db`. Ensure these are adjusted if needed.\n- You can run many commands either through `make` or manually, depending on your workflow.\n\n## Test the service:\n```bash\nmake test\n# Or manually:\ngo test -v ./tests -count=1\n```\n\n## Docker\nBuild and run with Docker Compose:\n```bash\n# Launch\n$ docker-compose up -d\n\n# Rebuild and launch\n$ docker-compose up -d --build\n\n# Stop\nStop the service (default port: 55055):\n$ docker-compose down\n```\n\n## License\nCopyright © 2025 [dasha.smyr@gmail.com](https://github.com/dariasmyr).\u003cbr /\u003e\nThis project is [MIT](LICENSE) licensed.\n\n\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdariasmyr%2Fsso","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdariasmyr%2Fsso","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdariasmyr%2Fsso/lists"}