{"id":26524975,"url":"https://github.com/authress/demo","last_synced_at":"2026-05-11T02:20:58.735Z","repository":{"id":281718662,"uuid":"715722986","full_name":"Authress/demo","owner":"Authress","description":"Authress Demo Walkthrough","archived":false,"fork":false,"pushed_at":"2025-03-10T19:06:45.000Z","size":623,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-10T20:22:33.298Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/Authress.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,"publiccode":null,"codemeta":null}},"created_at":"2023-11-07T17:47:48.000Z","updated_at":"2025-03-10T19:06:49.000Z","dependencies_parsed_at":"2025-03-10T20:32:45.133Z","dependency_job_id":null,"html_url":"https://github.com/Authress/demo","commit_stats":null,"previous_names":["authress/demo"],"tags_count":0,"template":false,"template_full_name":"Authress/vue-starter-kit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Authress%2Fdemo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Authress%2Fdemo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Authress%2Fdemo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Authress%2Fdemo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Authress","download_url":"https://codeload.github.com/Authress/demo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244815851,"owners_count":20514999,"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-03-21T14:40:08.007Z","updated_at":"2026-05-11T02:20:58.668Z","avatar_url":"https://github.com/Authress.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://authress.io/static/images/linkedin-banner.png\" alt=\"Authress media banner\"\u003e\n\u003c/p\u003e\n\n# Authress Interactive Demo\n\nA repository that contains an Vue example that uses Authress to Login.\n\n## Getting Started\n\nRun `yarn` and then `yarn start`. Or use pnpm to install dependencies and then `start` the site.\n\n### File Directory\n\n* `src`\n  * `main.ts` - Application Root and contains all the routes of the starter kit application\n  * `authressClient.ts` - Configuration for Authress for users to login\n  * `routes`\n    * `home.ts` - Landing page which has login and logout buttons\n    * `protected.ts` - Page protected by user login via the login guard defined in the `main.ts` file\n\n\n## Demo Instructions\n\n* `yarn`\n* `yarn start`\n\nThere is a demo experience that has a UI and an service API. The UI makes API calls to the service. We can see the data rendered in the view.\n\n\n# WALKTHROUGH\n\nSET DEMO AS AUTHRESS ACCOUNT:\n\n* [Demo slides](https://docs.google.com/presentation/d/1wVFtEbk7ilQS5MJzrTABA4dS3z2mCIpv1rBcPdL4_aU/edit#slide=id.g291f1f3c024_0_0)\n* [Extended Version](https://drive.google.com/drive/folders/1qeY7_MOUJQ7-b-WXptIgD7HOwILPNwjJ)\n\n\n0A. Reminder, it takes 30 after updating the record and removing reports/* for that to be propagated, because Access Record resource removals take 30s in the background.\n1. https://authress.io/app/#/settings\n2. Delete comments in report controller\n3. Delete Server.ts middleware\n\n\n### Starting\n* All data is public, users can log in and see their icon displayed.\n* The API is running and the UI can make these calls, but they are unauthenticated.\n\n### Add Login verification\n* Add a middleware to get the token and verify it\n\n```js server.ts\napp.use(authress);\n```\n\n* Demo that the UI doesn't work anymore because the user isn't logged in.\n* Add a guard in the UI that requires the user to log in.\n\n```js router.ts\nawait ensureUserIsLoggedIn(next);\n```\n\n* Then they log in\n\n### Add authorization\n* Navigate to a specific resource\n* We'll add a check to the service code which ensures that a user has the right permission to the resource\n\n```js reportsController.ts\nconst result = await authress.hasAccessToResource(userId, '/reports', 'reports:get');\n  if (!result) {\n    return forbidden(response);\n  }\n```\n\n* Then we'll see that they don't\n* Then go to Authress and configure:\n  * A new role\n  * Add the role to the access record for the global reports\n\n* What if they should only have access to some reports:\n\n```js reportsController.ts\nconst result = await authress.getUserResources(userId, '/reports', 'reports:get');\nallowedReports = result;\n```\n* Go back to the UI to display the list which now only has one element\n\n## Resource Hierarchies\n* Show Access Record for Sub Resources\n\n* Show Audit Trial\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fauthress%2Fdemo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fauthress%2Fdemo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fauthress%2Fdemo/lists"}