{"id":18966029,"url":"https://github.com/wso2/asgardeo-react-b2c-sample-app","last_synced_at":"2025-04-19T14:11:38.497Z","repository":{"id":192985261,"uuid":"687868905","full_name":"wso2/asgardeo-react-b2c-sample-app","owner":"wso2","description":"React sample web application to integrate with Asgardeo for B2C usecases","archived":false,"fork":false,"pushed_at":"2023-09-08T02:16:51.000Z","size":2957,"stargazers_count":1,"open_issues_count":0,"forks_count":4,"subscribers_count":50,"default_branch":"main","last_synced_at":"2025-04-16T08:10:27.500Z","etag":null,"topics":["asgardeo","b2c","iam","react","sample-app"],"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/wso2.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-06T07:14:05.000Z","updated_at":"2023-10-15T05:37:34.000Z","dependencies_parsed_at":"2024-11-08T14:50:00.998Z","dependency_job_id":null,"html_url":"https://github.com/wso2/asgardeo-react-b2c-sample-app","commit_stats":null,"previous_names":["wso2/asgardeo-react-b2c-sample-app"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wso2%2Fasgardeo-react-b2c-sample-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wso2%2Fasgardeo-react-b2c-sample-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wso2%2Fasgardeo-react-b2c-sample-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wso2%2Fasgardeo-react-b2c-sample-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wso2","download_url":"https://codeload.github.com/wso2/asgardeo-react-b2c-sample-app/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249709419,"owners_count":21313948,"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":["asgardeo","b2c","iam","react","sample-app"],"created_at":"2024-11-08T14:35:10.753Z","updated_at":"2025-04-19T14:11:38.480Z","avatar_url":"https://github.com/wso2.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# asgardeo-react-b2c-sample-app\nReact sample web application to integrate with Asgardeo for B2C usecases\n## 👀 Live Deployment\n\nA live preview of this demo is available at\n1. Vercel: [https://asgardeo-react-sample-app.vercel.app](https://asgardeo-react-sample-app.vercel.app)\n2. Netlify: [https://kaleidoscopic-medovik-1bf3fc.netlify.app](https://kaleidoscopic-medovik-1bf3fc.netlify.app)\n\n## Features/ Capabilities\n\n- Sign up to Asgardeo as a new user \n- Sign In and Sign Out of the application\n- Home page with the references and guides\n- The user roles Manager and User.\n  - Manager can view the Profile and API call pages\n  - User can view the Profile page\n- User Profile to view and update details.\n- API call page to send an API call.\n- User can set up the preferred option for second factor authentication\n\n## Configure Asgardeo to integrate with your application\n\nCreate the application\n\n1. Access Asgardeo at https://console.asgardeo.io/ and log in.\n\n2. Click Applications in the left navigation menu.\n\n3. Create a new application\n- Select Single Page Application\n\n\u003cimg src=\"./src/images/docs/applications.png\" alt=\"Applications\" title=\"Applications\"\u003e\n\n4. Fill the details and click Create.\n- Name: React-App\n- Authorized Redirect URLs: https://localhost:3000 (Use the Add New option)\n\n\u003cimg src=\"./src/images/docs/create-application.png\" alt=\"Create application\" title=\"Create application\"\u003e\n\nAdd Application Roles\n\n1. Navigate to  User Management \u003e Groups from the side panel\n2. Create a Group and add users\n\n\u003cimg src=\"./src/images/docs/add-group.png\" alt=\"Add group\" title=\"Add group\"\u003e\n\n3. Create a Role in the application\n\n\u003cimg src=\"./src/images/docs/create-role.png\" alt=\"Add role\" title=\"Add role\"\u003e\n\n4. Navigate to  User Management \u003e Roles from the side panel and assign the group to the role\n\n\u003cimg src=\"./src/images/docs/assign-group.png\" alt=\"Assign group\" title=\"Assign group\"\u003e\n\n\u003cimg src=\"./src/images/docs/application-role.png\" alt=\"Application role\" title=\"Application role\"\u003e\n\n5. Allow the application_roles attribute in the application\n\n\u003cimg src=\"./src/images/docs/application-roles-attribute.png\" alt=\"Application role attribute\" title=\"Application role attribute\"\u003e\n\nAdd Second Factor Authentication (Optional)\n\n1. Navigate to the Sign in methods of the application\n\n2. Add the second step authentication\n\n\u003cimg src=\"./src/images/docs/application-sign-in-method.png\" alt=\"Application signin method\" title=\"Application signin method\"\u003e\n\n\n## 🚀 Getting Started\n\n1. Clone the repository.\n\n```bash\ngit clone https://github.com/dasuni-30/asgardeo-react-sample-app.git\n```\n\n2. Install the dependencies.\n\n```bash\nnpm install\n```\n\n3. Create a `.env` file based on the `.env.example` file.\n\n```bash\ncp .env.example .env\n```\n\n4. Update the values in the `.env` file based on your requirements.\n\n```bash\n# The port number on which the client application will run\nPORT=3000\n\n# The base URL of the server's API that the client application will communicate with\n# E.g., http://localhost:5000\nREACT_APP_API_ENDPOINT=\u003cadd-server-api-url\u003e\n\n# The client ID for the Asgardeo Single Page Application (SPA) app\nREACT_APP_CLIENT_ID=\u003cadd-asgardeo-spa-app-client-id-here\u003e\n\n# The base URL for the client application\n# E.g., http://localhost:3000\nREACT_APP_CLIENT_BASE_URL=\u003cadd-client-app-base-url-here\u003e\n\n# The base URL for the Asgardeo organization's API\n# E.g., https://api.asgardeo.io/t/your-org\nREACT_APP_ASGARDEO_BASE_URL=\u003cadd-asgardeo-org-base-url-here\u003e\n\n# The sign-up URL for the Asgardeo organization\nREACT_APP_SIGN_UP_URL=\u003casgardeo-sign-up-url\u003e\n\n# The application name for the Asgardeo application\nREACT_APP_APPLICATION_NAME=\u003capplication-name\u003e\n\n# The organization name for the Asgardeo\nREACT_APP_ORG_NAME=\u003corg-name\u003e\n\n```\n\n5. Start the development server.\n\n```bash\nnpm start\n```\n\nThis will start the app on [http://localhost:3000](http://localhost:3000).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwso2%2Fasgardeo-react-b2c-sample-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwso2%2Fasgardeo-react-b2c-sample-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwso2%2Fasgardeo-react-b2c-sample-app/lists"}