{"id":18298441,"url":"https://github.com/fusionauth/fusionauth-example-node-centralized-sessions","last_synced_at":"2025-04-09T09:17:17.335Z","repository":{"id":249904041,"uuid":"822785282","full_name":"FusionAuth/fusionauth-example-node-centralized-sessions","owner":"FusionAuth","description":"Shows how to use centralized sessions with FusionAuth","archived":false,"fork":false,"pushed_at":"2024-07-29T17:30:16.000Z","size":2496,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-04-05T17:38:06.996Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FusionAuth.png","metadata":{"files":{"readme":"README.md","changelog":"changebank/.env","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-01T20:22:21.000Z","updated_at":"2024-09-16T20:11:14.000Z","dependencies_parsed_at":"2024-07-29T22:36:21.553Z","dependency_job_id":null,"html_url":"https://github.com/FusionAuth/fusionauth-example-node-centralized-sessions","commit_stats":null,"previous_names":["fusionauth/fusionauth-example-node-centralized-sessions"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FusionAuth%2Ffusionauth-example-node-centralized-sessions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FusionAuth%2Ffusionauth-example-node-centralized-sessions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FusionAuth%2Ffusionauth-example-node-centralized-sessions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FusionAuth%2Ffusionauth-example-node-centralized-sessions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FusionAuth","download_url":"https://codeload.github.com/FusionAuth/fusionauth-example-node-centralized-sessions/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248008624,"owners_count":21032556,"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-05T15:06:04.422Z","updated_at":"2025-04-09T09:17:17.311Z","avatar_url":"https://github.com/FusionAuth.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FusionAuth Node.js centralized sessions example\n\nThis project is two example Node.js applications that illustrates how you can easily implement sessions using refresh tokens to give you fine grained revocation using FusionAuth.\n\n## Prerequisites\n\nDocker and the ability to edit your hostnames file.\n\n## To run\n\n* Create two local aliases in your DNS: `changebank.local` and `changebankforum.local`, both resolving to `127.0.0.1`.\n* Run `docker compose up -d`. This will run FusionAuth and configure it using [Kickstart](https://fusionauth.io/docs/get-started/download-and-install/development/kickstart)\n  * Two users are created, both with the password `password. \n    * admin@example.com is an admin user that can log into the admin UI, located at http://localhost:9011.\n    * richard@example.com is a user that can log into the two application you'll start below. \n  * To stop FusionAuth later, run `docker compose down`\n* In the `changebank` directory, run:\n  * `npm install`\n  * `npm run dev`\n* In the `changebankforum` directory, run:\n  * `npm install`\n  * `npm run dev`\n\nIn an incognito window, go to `http://changebank.local:8080/` and login with `richard@example.com`. *Check 'keep me signed in'*.\n\nYou'll be able to log into your ChangeBank account and make change. \n\nNow, say you want to discuss whether nickels are better than dimes? Head over to the forum by clicking on 'Forum' in the navigation. You'll be transparently logged in. \n\nIn the non-incognito window, log into the admin UI using the credentials above. You can then navigate to Richard's account (under 'Users') and view the 'Sessions' tab, which will show you the sessions.\n\nIf you log out of ChangeBank Forum, you are only logged out of that application. If you log out of ChangeBank, the user is logged out of everything (all refresh tokens are revoked).\n\n[Learn more about Logout and Session Management in FusionAuth](https://fusionauth.io/docs/lifecycle/authenticate-users/logout-session-management)\n\n## Last updated\n\nThis was last reviewed Jun 2024.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffusionauth%2Ffusionauth-example-node-centralized-sessions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffusionauth%2Ffusionauth-example-node-centralized-sessions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffusionauth%2Ffusionauth-example-node-centralized-sessions/lists"}