{"id":20130680,"url":"https://github.com/chaseconey/auth0-proxy","last_synced_at":"2025-03-02T21:43:10.821Z","repository":{"id":43684734,"uuid":"462878666","full_name":"chaseconey/auth0-proxy","owner":"chaseconey","description":"A simple auth0 proxy","archived":false,"fork":false,"pushed_at":"2022-02-24T04:38:25.000Z","size":304,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-13T08:46:26.644Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chaseconey.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-02-23T19:31:45.000Z","updated_at":"2022-02-23T19:32:03.000Z","dependencies_parsed_at":"2022-08-20T09:41:00.338Z","dependency_job_id":null,"html_url":"https://github.com/chaseconey/auth0-proxy","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaseconey%2Fauth0-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaseconey%2Fauth0-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaseconey%2Fauth0-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaseconey%2Fauth0-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chaseconey","download_url":"https://codeload.github.com/chaseconey/auth0-proxy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241577071,"owners_count":19984940,"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":[],"created_at":"2024-11-13T20:39:27.028Z","updated_at":"2025-03-02T21:43:10.796Z","avatar_url":"https://github.com/chaseconey.png","language":"PHP","readme":"\n# auth0-proxy\n![CircleCI](https://img.shields.io/circleci/build/github/chaseconey/auth0-proxy)\n![Docker Image Version (latest semver)](https://img.shields.io/docker/v/chaseconey/auth0-proxy)\n\nThis is a simple Auth0 proxy built on top of the Laravel platform.\n\n## Usage\n\nThis project was designed to be docker first, but certainly can be deployed on other platforms. It was also designed to be configurable 100% from environment variables.\n\nFor a great primer on the available environment configuration, [check out the official Laravel docs](https://laravel.com/docs/9.x/configuration#environment-configuration).\n\n### Minimum Configuration\n\nFirst let's take a look at the minimum configuration required to proxy to another service.\n\n- `APP_KEY` - A base64 encoded application key. You can use Laravel's very own `artisan` cli to generate it with `php artisan key:generate`\n- `PROXY_BASE_URL` - The URL you want to proxy to\n- `AUTH0_CLIENT_ID` - The Auth0 Client ID to log your users in with\n- `AUTH0_CLIENT_SECRET` - The Auth0 Secret to log your users in with\n- `AUTH0_REDIRECT_URI` - The application url you want Auth0 to redirect you back to - this will be your domain name + `/auth/callback`\n- `AUTH0_BASE_URL` - The Auth0 domain name you are retrieving a token from (usually https://example-corp.auth0.com)\n\nUsing these values, would give you a proxy that:\n\n- will check your cookies to see if you have a session\n- if not, will send you to auth0 to grab your user information and give you a session\n- if so, will ensure that you actually are known to the application\n- then will proxy the content you requested returning the proper status codes, mime-types, etc\n\nThis configuration might be useful when this proxy has access to internal (i.e. accessible only to the proxy) materials that you want to authenticate public users to.\n\n### Docker Runtime\n\nCool, so you know how to configure it, now what? Well, if you have used docker before this should be pretty familiar. This image is hosted publicly on DockerHub and shouldn't require any spice.\n\nTo pull and run this image locally, you would do something like:\n\n```\ndocker run -e APP_KEY=\u003cvalue\u003e -P chaseconey/auth0-proxy\n```\n\nMake sure to pass in all of the required values from the minimum configuration section.\n\n### Password-Protected Endpoints\n\nAnother common setup that necessitates a proxy is when you have a password protected site that you want to grab access to, but using a different auth mechanism. We can do that too!\n\nYou can simply add the basic auth credentials as additional configuration\n\n- `PROXY_AUTH_USERNAME`\n- `PROXY_AUTH_PASSWORD`\n\n### External Database\n\nBy default, the proxy will use a local sqlite database to store user information for ease of use. Obviously, for larger installations, you might want to move that off into a separate database. Laravel has an adapter for most major engines out of the box.\n\nFor example, if you wanted to use a MySQL database, you would add the follow additional configuration:\n\n- `DB_CONNECTION` -`mysql`\n- `DB_HOST` - The FQDN of the MySQL host\n- `DB_PORT` (optional, default: `3306`)\n- `DB_DATABASE` - The name of the database\n- `DB_USERNAME`\n- `DB_PASSWORD`\n\nFor other configuration options, check out the [Laravel database docs](https://laravel.com/docs/9.x/database#configuration).\n\n### Load-balanced Configuration\n\nIn some situations you may want to load-balance the proxy, and there are a few things to keep in mind if you want to move into that configuration.\n\n1. You need to distribute the database\n2. You need to distribute the sessions\n\nWe covered distributing the database in the above section, so let's focus on the session configuration. By default session's are stored on the local filesystem. There are lots of options to use here, but if you are already using MySQL, you might just use the `database` driver.\n\nAs before, this is just some additional configuration.\n\n- `SESSION_DRIVER` - `database`\n\nTo see all the session options, check out the [Laravel session docs](https://laravel.com/docs/9.x/session#configuration).\n\n### Other Config Values\n\n- [Logging](https://laravel.com/docs/9.x/logging#configuration)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchaseconey%2Fauth0-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchaseconey%2Fauth0-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchaseconey%2Fauth0-proxy/lists"}