{"id":47702456,"url":"https://github.com/icoretech/omniauth-slack2","last_synced_at":"2026-04-07T23:00:49.372Z","repository":{"id":348418539,"uuid":"1197995590","full_name":"icoretech/omniauth-slack2","owner":"icoretech","description":"🔌 OmniAuth strategy for Slack OpenID Connect authentication","archived":false,"fork":false,"pushed_at":"2026-04-01T03:26:27.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-03T03:59:45.363Z","etag":null,"topics":["authentication","gem","identity","oauth-provider","oauth2","omniauth","omniauth-strategy","openid-connect","rails","ruby","slack"],"latest_commit_sha":null,"homepage":"https://rubygems.org/gems/omniauth-slack2","language":"Ruby","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/icoretech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-01T03:22:41.000Z","updated_at":"2026-04-01T03:27:42.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/icoretech/omniauth-slack2","commit_stats":null,"previous_names":["icoretech/omniauth-slack2"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/icoretech/omniauth-slack2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icoretech%2Fomniauth-slack2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icoretech%2Fomniauth-slack2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icoretech%2Fomniauth-slack2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icoretech%2Fomniauth-slack2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/icoretech","download_url":"https://codeload.github.com/icoretech/omniauth-slack2/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icoretech%2Fomniauth-slack2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31371633,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-03T17:53:18.093Z","status":"ssl_error","status_checked_at":"2026-04-03T17:53:17.617Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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","gem","identity","oauth-provider","oauth2","omniauth","omniauth-strategy","openid-connect","rails","ruby","slack"],"created_at":"2026-04-02T17:39:12.441Z","updated_at":"2026-04-03T19:01:03.818Z","avatar_url":"https://github.com/icoretech.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OmniAuth Slack Strategy\n\n[![Test](https://github.com/icoretech/omniauth-slack2/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/icoretech/omniauth-slack2/actions/workflows/test.yml?query=branch%3Amain)\n[![Gem Version](https://badge.fury.io/rb/omniauth-slack2.svg)](https://badge.fury.io/rb/omniauth-slack2)\n\n`omniauth-slack2` provides a Slack OpenID Connect strategy for OmniAuth.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'omniauth-slack2'\n```\n\nThen run:\n\n```bash\nbundle install\n```\n\n## Usage\n\nConfigure OmniAuth in your Rack/Rails app:\n\n```ruby\nRails.application.config.middleware.use OmniAuth::Builder do\n  provider :slack2,\n           ENV.fetch('SLACK_CLIENT_ID'),\n           ENV.fetch('SLACK_CLIENT_SECRET')\nend\n```\n\nCompatibility alias is available, so you can keep existing callback paths using `slack`:\n\n```ruby\nRails.application.config.middleware.use OmniAuth::Builder do\n  provider :slack,\n           ENV.fetch('SLACK_CLIENT_ID'),\n           ENV.fetch('SLACK_CLIENT_SECRET')\nend\n```\n\nIf you support both names during a migration, register both callback paths in Slack:\n\n- `https://your-app.example.com/auth/slack2/callback`\n- `https://your-app.example.com/auth/slack/callback`\n\n## Provider App Setup\n\n- Slack API Dashboard: \u003chttps://api.slack.com/apps\u003e\n- Enable **Sign in with Slack** under OAuth \u0026 Permissions\n- Register the callback URL that matches your provider name:\n  - `slack2`: `https://your-app.example.com/auth/slack2/callback`\n  - `slack`: `https://your-app.example.com/auth/slack/callback`\n- If your Slack app enforces PKCE, this strategy sends `code_challenge` / `code_verifier`\n  with `S256` by default\n- Required scopes: `openid`, `email`, `profile`\n\n## Options\n\nSupported request options include:\n\n- `scope` (default: `openid email profile`)\n- `nonce` (auto-generated by default)\n- `team` (pre-select a Slack workspace)\n- `pkce` (default: `true` — sends `code_challenge` / `code_verifier` using `S256`)\n- `skip_jwt` (default: `false` — set to `true` to skip id_token RS256 verification)\n\n## Troubleshooting\n\n- If Slack rejects a local callback while your app is enforcing PKCE, prefer a real\n  HTTPS hostname over `localhost` for interactive testing\n- The same callback/PKCE rules apply to the compat `slack` alias, not just `slack2`\n\n## Auth Hash\n\nExample payload from `request.env['omniauth.auth']` (realistic shape, anonymized):\n\n```json\n{\n  \"uid\": \"U0R7MFMJM\",\n  \"info\": {\n    \"name\": \"Sample User\",\n    \"email\": \"sample@example.test\",\n    \"unverified_email\": \"sample@example.test\",\n    \"email_verified\": true,\n    \"first_name\": \"Sample\",\n    \"last_name\": \"User\",\n    \"image\": \"https://secure.gravatar.com/avatar/example.jpg?s=512\u0026d=https%3A%2F%2Fa.slack-edge.com%2Fexample.png\",\n    \"locale\": \"en-US\"\n  },\n  \"credentials\": {\n    \"token\": \"xoxp-...\",\n    \"refresh_token\": \"xoxe-1-...\",\n    \"expires_at\": 1772691847,\n    \"expires\": true,\n    \"scope\": \"openid email profile\"\n  },\n  \"extra\": {\n    \"raw_info\": {\n      \"ok\": true,\n      \"sub\": \"U0R7MFMJM\",\n      \"https://slack.com/user_id\": \"U0R7MFMJM\",\n      \"https://slack.com/team_id\": \"T0123ABC456\",\n      \"email\": \"sample@example.test\",\n      \"email_verified\": true,\n      \"date_email_verified\": 1775000482,\n      \"name\": \"Sample User\",\n      \"picture\": \"https://secure.gravatar.com/avatar/example.jpg?s=512\u0026d=https%3A%2F%2Fa.slack-edge.com%2Fexample.png\",\n      \"given_name\": \"Sample\",\n      \"family_name\": \"User\",\n      \"locale\": \"en-US\",\n      \"https://slack.com/team_name\": \"Sample Workspace\",\n      \"https://slack.com/team_domain\": \"sampleworkspace\",\n      \"https://slack.com/user_image_512\": \"https://secure.gravatar.com/avatar/example.jpg?s=512\u0026d=https%3A%2F%2Fa.slack-edge.com%2Fexample.png\",\n      \"https://slack.com/team_image_230\": \"https://avatars.slack-edge.com/example-team_132.jpg\",\n      \"https://slack.com/team_image_default\": false\n    },\n    \"id_token\": \"eyJhbGciOiJSUzI1NiIs...\",\n    \"id_info\": {\n      \"iss\": \"https://slack.com\",\n      \"sub\": \"U0R7MFMJM\",\n      \"aud\": \"your-client-id\",\n      \"exp\": 1775009314,\n      \"iat\": 1775009014,\n      \"auth_time\": 1775009014,\n      \"nonce\": \"auto-generated-nonce\",\n      \"https://slack.com/team_id\": \"T0123ABC456\",\n      \"https://slack.com/user_id\": \"U0R7MFMJM\",\n      \"email\": \"sample@example.test\",\n      \"email_verified\": true,\n      \"date_email_verified\": 1775000482,\n      \"locale\": \"en-US\",\n      \"name\": \"Sample User\",\n      \"picture\": \"https://secure.gravatar.com/avatar/example.jpg?s=512\u0026d=https%3A%2F%2Fa.slack-edge.com%2Fexample.png\",\n      \"given_name\": \"Sample\",\n      \"family_name\": \"User\",\n      \"https://slack.com/team_name\": \"Sample Workspace\",\n      \"https://slack.com/team_domain\": \"sampleworkspace\",\n      \"https://slack.com/team_image_230\": \"https://avatars.slack-edge.com/example-team_132.jpg\",\n      \"https://slack.com/team_image_default\": false\n    },\n    \"team_id\": \"T0123ABC456\",\n    \"team_name\": \"Sample Workspace\",\n    \"team_domain\": \"sampleworkspace\"\n  }\n}\n```\n\n## Development\n\n```bash\nbundle install\nbundle exec standardrb --fix\nbundle exec rake\n```\n\nRun Rails integration tests with an explicit Rails version:\n\n```bash\nRAILS_VERSION='~\u003e 8.1.0' bundle install\nRAILS_VERSION='~\u003e 8.1.0' bundle exec rake test_rails_integration\n```\n\n## Compatibility\n\n- Ruby: `\u003e= 3.2` (tested on `3.2`, `3.3`, `3.4`, `4.0`)\n- `omniauth-oauth2`: `\u003e= 1.8`, `\u003c 2.0`\n- Rails integration lanes: `~\u003e 7.1.0`, `~\u003e 7.2.0`, `~\u003e 8.0.0`, `~\u003e 8.1.0`\n\n## Endpoints\n\nThis gem uses Slack OpenID Connect endpoints:\n\n- `https://slack.com/openid/connect/authorize`\n- `https://slack.com/api/openid.connect.token`\n- `https://slack.com/api/openid.connect.userInfo`\n- `https://slack.com/openid/connect/keys` (JWKS for id_token verification)\n\n## Test Structure\n\n- `test/omniauth_slack2_test.rb`: strategy/unit behavior\n- `test/rails_integration_test.rb`: full Rack/Rails request+callback flow\n- `test/test_helper.rb`: shared test bootstrap\n\n## Release\n\nTag releases as `vX.Y.Z`; GitHub Actions publishes the gem to RubyGems.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficoretech%2Fomniauth-slack2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ficoretech%2Fomniauth-slack2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficoretech%2Fomniauth-slack2/lists"}