{"id":25648620,"url":"https://github.com/stats4sd/shiny-external-auth-tester","last_synced_at":"2025-07-01T00:03:11.403Z","repository":{"id":77831063,"uuid":"475107162","full_name":"stats4sd/shiny-external-auth-tester","owner":"stats4sd","description":"A Shiny app to mimic the actions of an external application, used to authenticate *other* shiny applications","archived":false,"fork":false,"pushed_at":"2025-05-09T16:28:15.000Z","size":35,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-09T17:25:58.568Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stats4sd.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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,"zenodo":null}},"created_at":"2022-03-28T17:24:05.000Z","updated_at":"2025-05-09T16:28:19.000Z","dependencies_parsed_at":"2023-06-05T04:30:12.922Z","dependency_job_id":null,"html_url":"https://github.com/stats4sd/shiny-external-auth-tester","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stats4sd/shiny-external-auth-tester","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stats4sd%2Fshiny-external-auth-tester","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stats4sd%2Fshiny-external-auth-tester/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stats4sd%2Fshiny-external-auth-tester/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stats4sd%2Fshiny-external-auth-tester/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stats4sd","download_url":"https://codeload.github.com/stats4sd/shiny-external-auth-tester/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stats4sd%2Fshiny-external-auth-tester/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262870852,"owners_count":23377309,"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":"2025-02-23T13:15:35.440Z","updated_at":"2025-07-01T00:03:11.387Z","avatar_url":"https://github.com/stats4sd.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Test Shiny authentication from an external application locally\nThis repository should be used for testing Shiny applications that require authentication from external applications (e.g. Laravel platforms), without the need to setup the other application locally.\n\nThis application does the following:\n\n- It includes an iframe that should render your main Shiny app. It points to the url given\n\n## How to setup:\n\n1. Clone this repository alongside the shiny application you wish to test.\n - e.g. if your Shiny application is at `~\\projects\\your-shiny-app`, clone this into `~\\projects\\shiny-external-auth-tester`:\n - in Powershell:\n```\ncd ~\ngit clone ...\n```\n\n2. Create a \".sessions\" folder in the same projects folder. This will be the folder that your main Shiny app should write session url files to.\n\nYou should now have the following folder structure, assuming you're working inside `~\\projects\\':\n\n - your-app\\ -\u003e contains your main Shiny app\n - shiny-external-auth-tester\\ -\u003e contains this test app\n - .sessions\\ -\u003e is empty (for now)\n\n\n3. Run `renv::restore()` to setup the library dependencies for this application.\n\n4. Create the .env file for this test shiny app. Copy the .env.example file and confirm it has the following variables:\n\n```\nMAIN_SHINY_URL=\"http://127.0.0.1:7008\"\nURL=\"http://127.0.0.1:7009\"\n```\n\n5. Ensure that the shiny application you wish to test also has a .env file if required. You will likely need to add the following variables to it:\n\n```\nLARAVEL_APP_URL=http://127.0.0.1:7009\nURL=http://127.0.0.1:7008\n```\n\n\n## How to Run:\nTo test your main app responds correctly to the authentication POST requests, you need to run both apps at the same time on different ports. Do the following:\n\n1. In one R session, run your main Shiny app on port 7008: `runApp(port=7008)`\n2. In another R session, run this app on port 7009: `runApp(port=7009)`.\n\nTo secure your main shiny app, it should be setup such that no private data is shown when running normally (http://127.0.0.1:7008), but all data *is* shown when running inside the iframe within this Shiny app (http://127.0.0.1:7009).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstats4sd%2Fshiny-external-auth-tester","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstats4sd%2Fshiny-external-auth-tester","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstats4sd%2Fshiny-external-auth-tester/lists"}