{"id":14067270,"url":"https://github.com/LeonGraveland/shiny-auth0","last_synced_at":"2025-07-30T00:33:05.818Z","repository":{"id":222468343,"uuid":"265606298","full_name":"LeonGraveland/shiny-auth0","owner":"LeonGraveland","description":"Deploying and authenticating (Auth0) a shiny dashboard by a microservice architecture using docker-compose","archived":false,"fork":false,"pushed_at":"2020-05-22T19:43:44.000Z","size":38,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-04T07:37:00.493Z","etag":null,"topics":["auth0","docker","docker-compose","shiny"],"latest_commit_sha":null,"homepage":null,"language":"R","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/LeonGraveland.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2020-05-20T15:22:12.000Z","updated_at":"2024-08-26T15:32:46.000Z","dependencies_parsed_at":"2024-02-14T12:44:44.159Z","dependency_job_id":null,"html_url":"https://github.com/LeonGraveland/shiny-auth0","commit_stats":null,"previous_names":["leongraveland/shiny-auth0"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/LeonGraveland/shiny-auth0","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeonGraveland%2Fshiny-auth0","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeonGraveland%2Fshiny-auth0/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeonGraveland%2Fshiny-auth0/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeonGraveland%2Fshiny-auth0/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LeonGraveland","download_url":"https://codeload.github.com/LeonGraveland/shiny-auth0/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeonGraveland%2Fshiny-auth0/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267785798,"owners_count":24144122,"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","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"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":["auth0","docker","docker-compose","shiny"],"created_at":"2024-08-13T07:05:30.868Z","updated_at":"2025-07-30T00:33:05.552Z","avatar_url":"https://github.com/LeonGraveland.png","language":"R","funding_links":[],"categories":["R"],"sub_categories":[],"readme":"# Shiny server + Auth0 using Docker-Compose\n\u003e Deploying a shiny server web application adding an Auth0 authenticating layer with Docker Containers. \n\nThe following article gives a in-depth description of the installation and configuration on a single server: [Adding Authentication to Shiny Server in 4 Simple Steps](https://auth0.com/blog/adding-authentication-to-shiny-server/) This article containerizes this solution, it is advised to first read the original Auth0 article, we are following the same steps, with some shortcuts. \n\nThe solution contains four different (micro)services, three containerized and one auth0 (freemium) service\n1. Nginx - as webserver\n2. Shiny-auth0 - as communicating service between Auth0 and Shiny-server\n3. Shiny-server - running the shiny application\n4. Auth0 - Authentication layer\n\n![Visual Overview of the microservices and the flow](Visual%20Overview.png)\n\n\n# Getting Started\n## Prerequisites\n- A (free) [Auth0](https://auth0.com/) account \n- Docker and Docker-Compose installed\n\n\n## Deploy shiny app with docker-compose\n- [1. Configure Nginx](#1-configure-nginx)\n- [2. Set up Auth0 and shiny-auth0](#2-set-up-auth0-and-shiny-auth0)\n- [(optional) Add your own shiny app](#optional-deploy-your-custom-app)\n- [3. Docker-Compose Up](#3-docker-compose-up)\n### 1. Configure Nginx\n Check the Auth0 article for more information: [Get Nginx Up and Running](https://auth0.com/blog/adding-authentication-to-shiny-server/#Step-2--Get-Nginx-Up-and-Running)\n\n##### Create SSL certificates\nPut your SSL-certificates in the Nginx/SSL folder, or create self-signed certificates for testing or development. \n\n##### Adjust Nginx configuration\nIf not running local, adjust the nginx.conf file by replacing the '127.0.0.1' 3 times with your own domain name or ip address. The main difference between this configuraton file and the one in Auth0's article is in the location block: we do not forward traffic to localhost but to our shiny-auth0 service.\n\n\u003e Please note that this nginx configuration is not secure and not suitable for production. Adjust your nginx configuration file using the [Mozilla SSL Configuration Generator](https://ssl-config.mozilla.org/)\n\n### 2. Set up auth0 and shiny-auth0\nRead the Auth0 article on [Setting up an Auth0 Account for shiny-auth0](https://auth0.com/blog/adding-authentication-to-shiny-server/#Step-3--Setting-up-an-Auth0-Account-for-shiny-auth0) Change the .env file accordingly, do not change the 'SHINY_HOST' to localhost but use the value 'shiny' to forward traffic to our shiny-server container. \n\n### (optional) add your own shiny app\nPut your own custom app in the Shiny-server folder. If you want to add extra R libraries to the container, build your own image by adjusting the [Rocker/shiny](https://hub.docker.com/r/rocker/shiny/) Dockerfile. Modify the docker-compose.yml file to use your freshly build image instead of the rocker/shiny default. \n\n\n### 3. Docker-compose up\nTo deploy the services, we only have to 'docker-compose up'\n``` cmd\ndocker-compose up\n```\n\n# Reference\n- Auth0, [Adding Authentication to Shiny Server in 4 Simple Steps](https://auth0.com/blog/adding-authentication-to-shiny-server/)\n- Auth0, [Shiny-auth0](https://github.com/auth0/shiny-auth0)\n- Rocker, [Rocker Shiny](https://github.com/rocker-org/shiny)\n\n\n# Troubleshooting\n\u003cb\u003e I'm still able to access shiny directly over port 3838 \u003c/b\u003e \nOnly allow http/https traffic should solve the issue (I'm open for alternative solutions to this problem in this setup)\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLeonGraveland%2Fshiny-auth0","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FLeonGraveland%2Fshiny-auth0","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLeonGraveland%2Fshiny-auth0/lists"}