Traefik
Use Traefik with the traefik-casdoor-auth middleware to protect routes with Casdoor authentication and SSO.
Prerequisites
- Traefik v2.x or v3.x installed and running
- A Casdoor instance deployed and accessible
- Docker and Docker Compose (if using the containerized approach)
Step 1: Deploy Casdoor
Deploy Casdoor if needed. Then confirm:
- The Casdoor server is running and accessible
- You can log in to the Casdoor admin interface
- Test the login functionality by entering
adminand123
Step 2: Configure the Casdoor application
-
Create or edit a Casdoor application.
-
Add a redirect URL in the form:
http://<your-domain>/callbackFor example:
http://localhost:8080/callback -
Note down the following values from your application settings:
- Client ID
- Client Secret
- Organization Name
- Application Name

- Configure your application to use the appropriate authentication providers as needed.