https://github.com/fusionauth/fusionauth-example-symfony
Example application integrating symfony with an OAuth server
https://github.com/fusionauth/fusionauth-example-symfony
fusionauth login-system oauth oidc symfony
Last synced: about 2 months ago
JSON representation
Example application integrating symfony with an OAuth server
- Host: GitHub
- URL: https://github.com/fusionauth/fusionauth-example-symfony
- Owner: FusionAuth
- License: apache-2.0
- Created: 2021-04-15T16:28:01.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2026-04-21T22:57:22.000Z (about 2 months ago)
- Last Synced: 2026-04-25T03:42:58.321Z (about 2 months ago)
- Topics: fusionauth, login-system, oauth, oidc, symfony
- Language: PHP
- Homepage:
- Size: 68.4 KB
- Stars: 1
- Watchers: 10
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
- Security: SECURITY.md
Awesome Lists containing this project
README
# Securing a Symfony application with OAuth
This github repo shows a complete, if simple, symfony 5 application which integrates with an OAuth server for authentication and registration.
## Tutorial link
TBD
## Prerequisites
* Symfony 5 installed, including the `symfony` cli tool.
* Composer
* A modern PHP (tested with php 7.3.24)
* FusionAuth installed. See https://fusionauth.io/docs/v1/tech/5-minute-setup-guide/ for install instructions.
* A database such as MySQL installed.
## To set up
* Clone this repository
* run
* Set up a FusionAuth application in the admin UI.
* On the OAuth tab
* Add the following to the Authorized redirect URLs list: `http://localhost:8000/connect/fusionauth/check`
* Add the following to the Logout URL: `http://localhost:8000`
* On the Registration tab
* Turn on self service registration.
* set the type to 'Basic' and the login type to 'Email'
* Note and save the client secret and client id from the FusionAuth application
* Register a user for the FusionAuth application
* Set up your .env.local file with the following info
* Database connection info: `DATABASE_URL`
* FusionAuth client id: `CLIENT_ID`
* FusionAuth client secret: `CLIENT_SECRET`
* FusionAuth location: `FUSIONAUTH_BASE`, like `https://local.fusionauth.io`
* Run the migration to create the objects: `symfony console doctrine:migrations:migrate`
* Start the server: `symfony server:start`
* Visit `http://localhost:8000` and you should be able to login or register.