{"id":22009695,"url":"https://github.com/zitadel/example-symfony-oidc","last_synced_at":"2025-05-06T18:15:44.411Z","repository":{"id":216291254,"uuid":"736228822","full_name":"zitadel/example-symfony-oidc","owner":"zitadel","description":"Example Symfony PHP app","archived":false,"fork":false,"pushed_at":"2024-11-13T21:50:35.000Z","size":222,"stargazers_count":16,"open_issues_count":0,"forks_count":1,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-31T01:41:17.686Z","etag":null,"topics":["examples","oidc","php","php8","symfony","zitadel"],"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":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-27T10:29:50.000Z","updated_at":"2025-03-29T14:44:41.000Z","dependencies_parsed_at":"2024-11-11T11:31:36.769Z","dependency_job_id":"5e249010-75bf-4364-b8b6-adaf226059f2","html_url":"https://github.com/zitadel/example-symfony-oidc","commit_stats":null,"previous_names":["zitadel/example-symfony-oidc"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zitadel%2Fexample-symfony-oidc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zitadel%2Fexample-symfony-oidc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zitadel%2Fexample-symfony-oidc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zitadel%2Fexample-symfony-oidc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zitadel","download_url":"https://codeload.github.com/zitadel/example-symfony-oidc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252741475,"owners_count":21797027,"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":["examples","oidc","php","php8","symfony","zitadel"],"created_at":"2024-11-30T02:10:26.290Z","updated_at":"2025-05-06T18:15:44.389Z","avatar_url":"https://github.com/zitadel.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Example symfony OIDC\n\nThis repository provides a Symfony framework example for ZITADEL using OpenID connect (OIDC) authentication.\nThis example is provided as companion to our [guide](https://zitadel.com/docs/examples/login/symfony),\nwhich should produce this application when followed.\n\n## Features\n\n - OIDC Code flow with User Info call after authentication.\n - Fully integrated with Symfony security and firewall.\n - User Role mapping\n - Persistent user data using local sqlite file. See `DATABASE_URL` in [.env](.env).\n - Public page at `/`\n - Authenticated `/profile` page for all users.\n - Authenticated `/admin` page for admin role users.\n\n## Package structure\n\nThe package structure follows a [Symfony boilerplate app](https://symfony.com/doc/current/setup.html#creating-symfony-applications) generated with:\n\n```bash\nsymfony new my_project_directory --version=\"7.0.*\" --webapp\n```\n\nCode implementations live under [`src/`](/src/) with accompanying [templates](/templates/).\n\n## Getting started\n\nIf you want to run this example directly you can fork and clone it to your system.\nBe sure to [configure ZITADEL](https://docs-git-docs-example-symfony-zitadel.vercel.app/docs/examples/login/symfony#zitadel-setup) to accept requests from this app.\n\n### Prerequisites\n\nYou need a working PHP 8.2 or higher environment set up for use with Symfony. See more details in the [Symfony installation documentation](https://symfony.com/doc/current/setup.html#technical-requirements).\n\nAlternatively if you have a system with Docker and an IDE capable of running [Development Container](https://containers.dev/),\ndefinitions are provided with a complete PHP-8.2 environment, configuration and tools required for Symfony development.\nUse your IDE to build and launch the development environment or use GitHub code spaces from your browser.\n\n### Symfony\n\nAfter setting up your system and repository, install the project dependencies locally.\n\n```bash\ncomposer install\n```\n\nAt this point you might want to start a [`xdebug` client](https://xdebug.org/docs/step_debug#clients).\nThis is not required, but php might complain in the following steps that it can't connect to a `xdebug` client.\nAn example [`launch.json``](.vscode/launch.json) file has been provided for VSCode. Use the \"Listen for Xdebug\" option.\n\nYou can check the application environment with:\n\n```bash\nbin/console about\n```\n\nCreate a local sqlite database (stored in `./var`).:\n\n```bash\nbin/console doctrine:database:create\nbin/console doctrine:migrations:migrate\n```\n\nAnd run the development server:\n\n```bash\nsymfony server:start --no-tls\n```\n\nVisit [http://localhost:8000] and click around. When you go to profile you will be redirected to login your user on ZITADEL. After login you should see some profile data of the current user. Upon clicking logout you are redirected to the homepage. Now you can click \"users\" and login with an account that has the admin role.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzitadel%2Fexample-symfony-oidc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzitadel%2Fexample-symfony-oidc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzitadel%2Fexample-symfony-oidc/lists"}