{"id":20164986,"url":"https://github.com/openscript-ch/ory-kratos-oauth2-redirector","last_synced_at":"2026-04-19T01:04:14.735Z","repository":{"id":104434843,"uuid":"567164612","full_name":"openscript-ch/ory-kratos-oauth2-redirector","owner":"openscript-ch","description":"Redirects the user to the requested OAuth2 provider","archived":false,"fork":false,"pushed_at":"2023-06-05T08:45:37.000Z","size":58,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-13T14:33:12.521Z","etag":null,"topics":[],"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/openscript-ch.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":"2022-11-17T07:55:01.000Z","updated_at":"2022-11-17T09:38:35.000Z","dependencies_parsed_at":"2023-07-03T23:47:45.195Z","dependency_job_id":null,"html_url":"https://github.com/openscript-ch/ory-kratos-oauth2-redirector","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openscript-ch%2Fory-kratos-oauth2-redirector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openscript-ch%2Fory-kratos-oauth2-redirector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openscript-ch%2Fory-kratos-oauth2-redirector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openscript-ch%2Fory-kratos-oauth2-redirector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openscript-ch","download_url":"https://codeload.github.com/openscript-ch/ory-kratos-oauth2-redirector/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241600920,"owners_count":19988827,"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-14T00:36:22.089Z","updated_at":"2026-04-19T01:04:09.708Z","avatar_url":"https://github.com/openscript-ch.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ory Kratos OAuth2 Redirector\n\nRedirects incoming get requests to the OAuth2 provider configured inside Kratos.\n\n## Usage\n\nUse the Docker image pushed to the Github Registry:\n\n```bash\ndocker pull ghcr.io/openscript-ch/ory-kratos-oauth2-redirector:latest\n```\n\n### Environment variables\n\n| Name | Description | Default |\n|---|---|---|\n| `PORT` | Listning port of this service for HTTP requests | `3000` |\n| `LOGIN_ENDPOINT` | Endpoint which initiates the OAuth2 login process | - |\n| `REGISTRATION_ENDPOINT` | Endpoint which initiates the OAuth2 registration process | - |\n\n### Query parameters\n\n| Name | Description | Example |\n|---|---|---|\n| `provider` | OIDC provider | `google` |\n| `csrf_token` | CSRF token of the flow | `32kljfa2lc03gov8sal...` |\n| `flow` | ID of the flow | `32kljfa2lc03gov8sal...` |\n| `traits` | When traits are present, the `REGISTRATION_ENDPOINT` is used, otherwise it's `LOGIN_ENDPOINT`. | `{\"lang\":\"de\",\"tac\":\"timestamp\",\"dp\":\"timestamp\"}` |\n| `upstream_parameters` | https://www.ory.sh/docs/kratos/bring-your-own-ui/custom-ui-advanced-integration#upstream-provider-parameters | `{\"prompt\":\"select_account\"}` |\n\n### Example requests\n\n- **Login**: `http://localhost:3000?provider=google\u0026csrf_token=S9qg1Y2EZZ2vghjFAnXtDV2VTosrGFAe/XdOmlyD9MQyB+K/2g9FrtpkMe40/yJ8lOCuFDQHXbVitbR5iIsRtw==\u0026flow=56dfcc4a-95af-41c6-876f-93b9c75f9e29`\n- **With traits**: `http://localhost:3000?oauth2?provider=google\u0026csrf_token=92kMiSR3SQ/gkipWWeW6kXMwExTMwCUWIveiNwzD4JUSvyjk1WBzCgZTneaFRBTxXzS/jpQirg+uZnfri31NDw==\u0026flow=497d988d-167a-4588-9821-38f4863addb1\u0026traits=%7B%22lang%22%3A%22en%22%2C%22tac%22%3A%221681216465715%22%2C%22dp%22%3A%221681216465715%22%7D`\n- **With traits and upstream_parameters**: `http://localhost:3000?provider=google\u0026csrf_token=92kMiSR3SQ/gkipWWeW6kXMwExTMwCUWIveiNwzD4JUSvyjk1WBzCgZTneaFRBTxXzS/jpQirg+uZnfri31NDw==\u0026flow=497d988d-167a-4588-9821-38f4863addb1\u0026traits=%7B%22lang%22%3A%22en%22%2C%22tac%22%3A%221681216465715%22%2C%22dp%22%3A%221681216465715%22%7D\u0026upstream_parameters=%7B%22prompt%22%3A%22select_account%22%7D`\n\n## Development\n\nRun with `LOGIN_ENDPOINT=https://httpbin.org/anything REGISTRATION_ENDPOINT=https://httpbin.org/anything go run ory_kratos_oauth2_redirector.go`\n\n### Upgrade dependencies\n\n1. Update dependencies with `go get -u`\n1. Clean up dependency tree with `go mod tidy`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenscript-ch%2Fory-kratos-oauth2-redirector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenscript-ch%2Fory-kratos-oauth2-redirector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenscript-ch%2Fory-kratos-oauth2-redirector/lists"}