{"id":51900390,"url":"https://github.com/zitadel/zitadel-php","last_synced_at":"2026-07-26T14:03:30.679Z","repository":{"id":372342647,"uuid":"1240751741","full_name":"zitadel/zitadel-php","owner":"zitadel","description":"Official Zitadel PKCE authentication middleware for PHP — Laravel, Symfony, CodeIgniter 4, Phalcon, Yii 3, Slim 4, Mezzio","archived":false,"fork":false,"pushed_at":"2026-07-20T15:16:09.000Z","size":625,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-20T17:15:24.173Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://zitadel.com","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zitadel.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":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-05-16T14:23:36.000Z","updated_at":"2026-06-25T06:12:37.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/zitadel/zitadel-php","commit_stats":null,"previous_names":["zitadel/zitadel-php"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/zitadel/zitadel-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zitadel%2Fzitadel-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zitadel%2Fzitadel-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zitadel%2Fzitadel-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zitadel%2Fzitadel-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zitadel","download_url":"https://codeload.github.com/zitadel/zitadel-php/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zitadel%2Fzitadel-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35916664,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-26T02:00:06.503Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2026-07-26T14:03:29.821Z","updated_at":"2026-07-26T14:03:30.674Z","avatar_url":"https://github.com/zitadel.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Zitadel PHP SDK\n\nOfficial PHP middleware library for Zitadel authentication using the OAuth 2.0\nAuthorization Code + PKCE flow.\n\n- Zero server-side sessions — all state in encrypted HttpOnly cookies\n- Zero custom routes — middleware intercepts callback and logout automatically\n- Zero external runtime dependencies — only `ext-openssl`, `ext-sodium`, `ext-curl`\n- PHP 8.3+ with full `readonly class` immutability\n- Supports Laravel, Symfony, Yii 3, CodeIgniter 4, and Phalcon\n\n## Installation\n\n```bash\ncomposer require zitadel/sdk\n```\n\n## Quick Start\n\n### Laravel\n\nAuto-discovered. Set environment variables and optionally publish config:\n\n```bash\nphp artisan vendor:publish --tag=zitadel-config\n```\n\n### Symfony\n\n```php\n// config/bundles.php\nZitadel\\Sdk\\Bridge\\Symfony\\ZitadelBundle::class =\u003e ['all' =\u003e true],\n```\n\n### Yii 3\n\nRegister the bridge middleware and its router bindings in `config/web/di.php`:\n\n```php\nuse Zitadel\\Sdk\\Bridge\\Yii\\ZitadelMiddleware;\nuse Yiisoft\\Router\\FastRoute\\UrlMatcher;\nuse Yiisoft\\Router\\UrlMatcherInterface;\n// ... see docs/yii.rst for the full DI config\n```\n\nPlace `ZitadelMiddleware::class` before `Router::class` in your middleware pipeline.\n\n### Slim 4 / Mezzio (PSR-15 native)\n\n```php\nuse Zitadel\\Sdk\\Middleware\\ZitadelMiddleware;\n\n$app-\u003eadd(new ZitadelMiddleware($config, $validator, $responseFactory));\n```\n\n## Configuration\n\n```php\n$config = new ZitadelConfig(\n    issuerUrl:    'https://my.zitadel.cloud',\n    clientId:     'your-client-id',\n    redirectUri:  'https://myapp.com/zitadel/callback',\n    cookieSecret: bin2hex(random_bytes(32)),  // generate once, store in env\n    protectAll:   true,\n    ignoredRoutes: ['/health', '/'],\n);\n```\n\n## Documentation\n\nSee [docs/index.rst](docs/index.rst) or the per-framework guides in `docs/`.\n\n## License\n\nApache 2.0 — see [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzitadel%2Fzitadel-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzitadel%2Fzitadel-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzitadel%2Fzitadel-php/lists"}