{"id":24653097,"url":"https://github.com/authrocket/authrocket-php","last_synced_at":"2026-04-29T09:08:56.503Z","repository":{"id":56963160,"uuid":"63988638","full_name":"authrocket/authrocket-php","owner":"authrocket","description":"AuthRocket client for PHP","archived":false,"fork":false,"pushed_at":"2022-11-10T22:38:24.000Z","size":245,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-20T18:54:28.304Z","etag":null,"topics":["authrocket","php","php-library"],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/authrocket.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-07-22T23:07:03.000Z","updated_at":"2022-11-07T05:36:14.000Z","dependencies_parsed_at":"2022-08-21T05:40:26.548Z","dependency_job_id":null,"html_url":"https://github.com/authrocket/authrocket-php","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/authrocket/authrocket-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/authrocket%2Fauthrocket-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/authrocket%2Fauthrocket-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/authrocket%2Fauthrocket-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/authrocket%2Fauthrocket-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/authrocket","download_url":"https://codeload.github.com/authrocket/authrocket-php/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/authrocket%2Fauthrocket-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32418289,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T06:29:02.080Z","status":"ssl_error","status_checked_at":"2026-04-29T06:29:00.631Z","response_time":110,"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":["authrocket","php","php-library"],"created_at":"2025-01-25T20:13:48.359Z","updated_at":"2026-04-29T09:08:56.488Z","avatar_url":"https://github.com/authrocket.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AuthRocket\n\n[AuthRocket](https://authrocket.com/) provides Auth as a Service, making it quick and easy to add signups, logins, social auth, a full user management UI, and much more to your app.\n\nThe `authrocket` PHP library covers all of our Core API. It also covers select portions of the Configuration API.\n\n\n## Installation\n\nThe library is designed to be installed using `composer`. It should also be usable using any other method typically supported by composer-compatible packages.\n\nFor installation, run:\n```bash\ncomposer require authrocket/authrocket\n\n# alternate:\nphp composer.phar require authrocket/authrocket\n```\n\nOr, add `\"authrocket/authrocket\": \"^2\"` to the `require` section of your composer.json and run `composer install`.\n\nYou can also download `authrocket.phar`, a .zip, or a .tar.gz of the latest release directly from GitHub: https://github.com/authrocket/authrocket-php/releases/latest\n\n\n## Client Basics\n\n### Using environment variables\n\nIf you are using environment variables to manage external services like AuthRocket, then it's very easy to initialize the AuthRocket client:\n\n```php\n$client = \\AuthRocket\\AuthRocket::autoConfigure();\n```\n\nEnsure these environment variables are set:\n\n```bash\n# If only validating tokens\nLOGINROCKET_URL    = https://SAMPLE.e2.loginrocket.com/\n\n# If only validating tokens and default JWT key type has been changed to HS256\nLOGINROCKET_URL    = https://SAMPLE.e2.loginrocket.com/\nAUTHROCKET_JWT_KEY = SAMPLE\n\n# To use the AuthRocket API\nAUTHROCKET_API_KEY = ks_SAMPLE\nAUTHROCKET_URL     = https://api-e2.authrocket.com/v2\nAUTHROCKET_REALM   = rl_SAMPLE  # optional, but recommended (see below)\n# plus LOGINROCKET_URL and/or AUTHROCKET_JWT_KEY if also validating tokens\n```\n\n`AUTHROCKET_API_KEY = ks_SAMPLE`\nYour AuthRocket API key. Required to use the API (but not if only performing JWT verification of login tokens).\n\n`AUTHROCKET_JWT_KEY = SAMPLE`\nUsed to perform JWT signing verification of login tokens. Not required if validating all tokens using the API instead. Also not required if LOGINROCKET_URL is set and RS256 keys are being used, as public keys will be auto-retrieved. This is a realm-specific value, so like `AUTHROCKET_REALM`, set it directly if using multiple realms (see below).\n\n`AUTHROCKET_REALM = rl_SAMPLE`\nSets an application-wide default realm ID. If you're using a single realm, this is definitely easiest. Certain multi-tenant apps might use multiple realms. In this case, don't set this globally, but directly when constructing the client (see below).\n\n`AUTHROCKET_URL = https://api-e2.authrocket.com/v2`\nThe URL of the AuthRocket API server. This may vary depending on which cluster your service is provisioned on.\n\n`LOGINROCKET_URL = https://SAMPLE.e2.loginrocket.com/`\nThe LoginRocket URL for your Connected App. Used for auto-retrieval of RS256 JWT keys (if AUTHROCKET_JWT_KEY is not set). If your app uses multiple realms, you may need to set this directly instead (see below). If you're using a custom domain, this will be that domain and will not contain 'loginrocket.com'.\n\nIf you are using multiple realms, we recommend building a new client for each realm, directly setting `realm`, `jwtKey`, and/or `loginrocketUrl`:\n\n```php\n$client = \\AuthRocket\\AuthRocket::autoConfigure([\n  'realm'          =\u003e 'rl_SAMPLE',\n  'jwtKey'         =\u003e 'SAMPLE',\n  'loginrocketUrl' =\u003e 'https://SAMPLE.e2.loginrocket.com/'\n]);\n```\n\nSimilarly, if changing locales between requests, build a new client for each:\n\n```php\n$client = \\AuthRocket\\AuthRocket::autoConfigure([\n  'locale' =\u003e 'es'\n]);\n```\n\n\n### Direct configuration\n\nIt's also possible to configure the AuthRocket client instance directly:\n\n```php\n$client = new \\AuthRocket\\AuthRocket([\n  'apiKey'         =\u003e 'ks_SAMPLE',\n  'url'            =\u003e 'https://api-e2.authrocket.com/v2',\n  'realm'          =\u003e 'rl_SAMPLE',\n  'jwtKey'         =\u003e 'SAMPLE',\n  'loginrocketUrl' =\u003e 'https://SAMPLE.e2.loginrocket.com/',\n  'locale'         =\u003e 'en'\n]);\n```\n\n\n## Usage\n\nDocumentation is provided on our site:\n\n* [PHP Integration Guide](https://authrocket.com/docs/integration/php)\n* [PHP SDK Docs](https://authrocket.com/docs/sdks/php) (Expands on this README)\n* [API Docs with PHP examples](https://authrocket.com/docs/api#core-api)\n\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fauthrocket%2Fauthrocket-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fauthrocket%2Fauthrocket-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fauthrocket%2Fauthrocket-php/lists"}