{"id":13878642,"url":"https://github.com/stytchauth/stytch-ruby","last_synced_at":"2025-04-04T17:06:56.805Z","repository":{"id":38229009,"uuid":"308417404","full_name":"stytchauth/stytch-ruby","owner":"stytchauth","description":"Official Stytch Backend SDK for Ruby","archived":false,"fork":false,"pushed_at":"2025-03-28T14:55:35.000Z","size":523,"stargazers_count":40,"open_issues_count":4,"forks_count":4,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-28T16:07:44.598Z","etag":null,"topics":["authentication","ruby","sdk","stytch"],"latest_commit_sha":null,"homepage":"","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/stytchauth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-29T18:34:18.000Z","updated_at":"2025-03-24T17:02:46.000Z","dependencies_parsed_at":"2023-02-09T17:46:36.564Z","dependency_job_id":"0cc824a4-b538-4821-a6cf-0d183d9b066b","html_url":"https://github.com/stytchauth/stytch-ruby","commit_stats":{"total_commits":95,"total_committers":15,"mean_commits":6.333333333333333,"dds":0.7473684210526316,"last_synced_commit":"76541496c3cc22d380052a3d314c6b5c935633a0"},"previous_names":[],"tags_count":94,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stytchauth%2Fstytch-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stytchauth%2Fstytch-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stytchauth%2Fstytch-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stytchauth%2Fstytch-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stytchauth","download_url":"https://codeload.github.com/stytchauth/stytch-ruby/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246536158,"owners_count":20793395,"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":["authentication","ruby","sdk","stytch"],"created_at":"2024-08-06T08:01:55.517Z","updated_at":"2025-04-04T17:06:56.737Z","avatar_url":"https://github.com/stytchauth.png","language":"Ruby","readme":"# Stytch Ruby Gem\n\nThe Stytch Ruby gem makes it easy to use the Stytch user infrastructure API in Ruby applications.\n\nIt pairs well with the Stytch [Web SDK](https://www.npmjs.com/package/@stytch/vanilla-js) or your own custom authentication flow.\n\n## Install\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'stytch'\n```\n\nAnd then execute:\n\n    $ bundle install\n\nOr install it yourself as:\n\n    $ gem install stytch\n\n## Usage\n\nYou can find your API credentials in the [Stytch Dashboard](https://stytch.com/dashboard/api-keys).\n\nThis client library supports all Stytch's live products:\n\n### B2C\n\n  - [x] [Email Magic Links](https://stytch.com/docs/api/send-by-email)\n  - [x] [Embeddable Magic Links](https://stytch.com/docs/guides/magic-links/embeddable-magic-links/api)\n  - [x] [OAuth logins](https://stytch.com/docs/guides/oauth/idp-overview)\n  - [x] [SMS passcodes](https://stytch.com/docs/api/send-otp-by-sms)\n  - [x] [WhatsApp passcodes](https://stytch.com/docs/api/whatsapp-send)\n  - [x] [Email passcodes](https://stytch.com/docs/api/send-otp-by-email)\n  - [x] [Session Management](https://stytch.com/docs/guides/sessions/using-sessions)\n  - [x] [WebAuthn](https://stytch.com/docs/guides/webauthn/api)\n  - [x] [Time-based one-time passcodes (TOTPs)](https://stytch.com/docs/guides/totp/api)\n  - [x] [Crypto wallets](https://stytch.com/docs/guides/web3/api)\n  - [x] [Passwords](https://stytch.com/docs/guides/passwords/api)\n\n### B2B\n\n- [x] [Organizations](https://stytch.com/docs/b2b/api/organization-object)\n- [x] [Members](https://stytch.com/docs/b2b/api/member-object)\n- [x] [Email Magic Links](https://stytch.com/docs/b2b/api/send-login-signup-email)\n- [x] [OAuth logins](https://stytch.com/docs/b2b/api/oauth-google-start)\n- [x] [Session Management](https://stytch.com/docs/b2b/api/session-object)\n- [x] [Single-Sign On](https://stytch.com/docs/b2b/api/sso-authenticate-start)\n- [x] [Discovery](https://stytch.com/docs/b2b/api/discovered-organization-object)\n- [x] [Passwords](https://stytch.com/docs/b2b/api/passwords-authenticate)\n\n### Example B2C usage\nCreate an API client:\n```ruby\nclient = Stytch::Client.new(\n    env: :test, # available environments are :test and :live\n    project_id: \"***\",\n    secret: \"***\"\n)\n```\n\nSend a magic link by email:\n```ruby\nclient.magic_links.email.login_or_create(\n    email: \"sandbox@stytch.com\"\n)\n```\n\nAuthenticate the token from the magic link:\n```ruby\nclient.magic_links.authenticate(\n    token: \"SeiGwdj5lKkrEVgcEY3QNJXt6srxS3IK2Nwkar6mXD4=\"\n)\n```\n\n### Example B2B usage\n\nCreate an API client:\n```ruby\nrequire 'stytch'\n\nclient = StytchB2B::Client.new(\n  project_id: \"project-test-uuid\",\n  secret: \"secret-test-uuid\"\n)\n```\n\nCreate an organization\n\n```ruby\nresp = client.organizations.create(\n  organization_name: 'Example Org Inc.',\n  organization_slug: 'example-org'\n)\n\nputs resp\n```\n\nLog the first user into the organization\n\n```ruby\nresp = client.magic_links.email.login_or_signup(\n  organization_id: 'organization-test-07971b06-ac8b-4cdb-9c15-63b17e653931',\n  email_address: 'sandbox@stytch.com'\n)\n\nputs resp\n```\n\n\n## Handling Errors\n\nWhen possible the response will contain an `error_type` and an `error_message` that can be used to distinguish errors.\n\nLearn more about errors in the [docs](https://stytch.com/docs/api/errors).\n\n## Documentation\n\nSee example requests and responses for all the endpoints in the [Stytch API Reference](https://stytch.com/docs/api).\n\nFollow one of the [integration guides](https://stytch.com/docs/guides) or start with one of our [example apps](https://stytch.com/docs/example-apps).\n\n## Support\n\nIf you've found a bug, [open an issue](https://github.com/stytchauth/stytch-ruby/issues/new)!\n\nIf you have questions or want help troubleshooting, join us in [Slack](https://stytch.com/docs/resources/support/overview) or email support@stytch.com.\n\nIf you've found a security vulnerability, please follow our [responsible disclosure instructions](https://stytch.com/docs/resources/security-and-trust/security#:~:text=Responsible%20disclosure%20program).\n\n## Development\n\nSee [DEVELOPMENT.md](DEVELOPMENT.md)\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the Stytch project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](CODE_OF_CONDUCT.md).\n","funding_links":[],"categories":["Ruby"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstytchauth%2Fstytch-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstytchauth%2Fstytch-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstytchauth%2Fstytch-ruby/lists"}