{"id":18298645,"url":"https://github.com/fusionauth/fusionauth-example-node-multi-tenant","last_synced_at":"2025-10-18T16:35:55.295Z","repository":{"id":71200455,"uuid":"333227592","full_name":"FusionAuth/fusionauth-example-node-multi-tenant","owner":"FusionAuth","description":"Multi tenant applications with FusionAuth","archived":false,"fork":false,"pushed_at":"2024-07-28T05:55:22.000Z","size":26,"stargazers_count":2,"open_issues_count":2,"forks_count":2,"subscribers_count":13,"default_branch":"main","last_synced_at":"2024-07-28T06:45:44.497Z","etag":null,"topics":["hacktoberfest"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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":null,"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":"2021-01-26T21:55:37.000Z","updated_at":"2024-07-28T05:55:25.000Z","dependencies_parsed_at":"2024-07-28T06:52:26.695Z","dependency_job_id":null,"html_url":"https://github.com/FusionAuth/fusionauth-example-node-multi-tenant","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FusionAuth%2Ffusionauth-example-node-multi-tenant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FusionAuth%2Ffusionauth-example-node-multi-tenant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FusionAuth%2Ffusionauth-example-node-multi-tenant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FusionAuth%2Ffusionauth-example-node-multi-tenant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FusionAuth","download_url":"https://codeload.github.com/FusionAuth/fusionauth-example-node-multi-tenant/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223192689,"owners_count":17103564,"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":["hacktoberfest"],"created_at":"2024-11-05T15:06:37.528Z","updated_at":"2025-10-18T16:35:55.198Z","avatar_url":"https://github.com/FusionAuth.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FusionAuth Node.js example\n\nThis project is two simple example Node.js applications that illustrates how you can easily implement multi tenant applications using FusionAuth.\n\n## To run\n\nThis assumes you already have a running FusionAuth instance, user and application running locally. If you don't, please see the [5-Minute Setup Guide](https://fusionauth.io/docs/v1/tech/5-minute-setup-guide) to do so.\n\n* Create two local aliases in your DNS: `hooli.local` and `piedpiper.local`, both resolving to `127.0.0.1`.\n* Log into the FusionAuth admin panel\n* Create two tenants, `Hooli Tenant` and `Pied Piper Tenant`\n* Create two applications, `Hooli` and `Pied Piper`\n  * Update the `Hooli` FusionAuth application to allow a redirect of `http://hooli.local:3001/oauth-redirect`\n  * Update the `Pied Piper` FusionAuth application to allow a redirect of `http://piedpiper.local:3000/oauth-redirect`\n* Create a user in each tenant. They can have different passwords.\n* Make sure your user has a first name. \n* Register your user for the applications in the corresponding tenant. \n* Return to your terminal window.\n* In the `hooli` directory, run:\n  * `npm install`\n  * update `routes/index.js` with the client id and client secret of your FusionAuth application.\n  * `PORT=3001 npm start`\n* In the `piedpiper` directory, run:\n  * `npm install`\n  * update `routes/index.js` with the client id and client secret of your FusionAuth application.\n  * `PORT=3000 npm start`\n\nOpen an incognito browser (or a different one) \n\nGo to `http://hooli.local:3001/` and login with the previously created user for the Hooli application.\n\nYou should see 'Hello [firstname]'.\n\nThen go to `http://piedpiper.local:3000`. You will be prompted to sign in again with the different password.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffusionauth%2Ffusionauth-example-node-multi-tenant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffusionauth%2Ffusionauth-example-node-multi-tenant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffusionauth%2Ffusionauth-example-node-multi-tenant/lists"}