Ruby 3.2 or later, no runtime gem dependencies.
Install
Section titled “Install”gem install ohauthcat -v 0.0.2- Create a client:
OhAuthCat:.: Client. new( api_key: ENV. fetch( "OHAUTHCAT_API_KEY"), client_id: "pk_. . . ") - Call any API operation, for example
client., or page through everything withorganizations. get_organization( "org_. . . ") list_directory_users_auto_paging. - SSO:
client.returns the URL and asso_helpers. get_authorization_url( redirect_uri: , domain: ) code_verifierto store on your server; thenclient..sso_helpers. get_profile_and_token( code: , code_verifier: , redirect_uri: ) - Webhooks:
OhAuthCat:.: Webhooks. verify( request. raw_post, request. headers["OhAuthCat-Signature"], secret) - Errors are
OhAuthCat::Errorsubclasses, such asNotFoundErrorandRateLimitedError, with the stablecode. - Pass
idempotency_key:to set your own key on a write.