{"id":27615588,"url":"https://github.com/nitish2773/reactauthenticationfunctionality","last_synced_at":"2026-05-05T22:42:46.761Z","repository":{"id":289086733,"uuid":"970068888","full_name":"Nitish2773/ReactAuthenticationFunctionality","owner":"Nitish2773","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-21T12:33:54.000Z","size":191,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-23T03:56:31.355Z","etag":null,"topics":["api","cookies","react-router","reactjs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Nitish2773.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,"zenodo":null}},"created_at":"2025-04-21T12:16:26.000Z","updated_at":"2025-04-21T12:38:37.000Z","dependencies_parsed_at":"2025-04-21T13:50:46.686Z","dependency_job_id":null,"html_url":"https://github.com/Nitish2773/ReactAuthenticationFunctionality","commit_stats":null,"previous_names":["nitish2773/reactauthenticationfunctionality"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nitish2773%2FReactAuthenticationFunctionality","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nitish2773%2FReactAuthenticationFunctionality/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nitish2773%2FReactAuthenticationFunctionality/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nitish2773%2FReactAuthenticationFunctionality/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Nitish2773","download_url":"https://codeload.github.com/Nitish2773/ReactAuthenticationFunctionality/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250366715,"owners_count":21418769,"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":["api","cookies","react-router","reactjs"],"created_at":"2025-04-23T03:56:34.395Z","updated_at":"2026-05-05T22:42:46.698Z","avatar_url":"https://github.com/Nitish2773.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"In this project, let's build **Authentication Functionality** by applying the concepts we have learned till now.\n\n### Refer to the image below:\n\n\u003cbr/\u003e\n\u003cdiv style=\"text-align: center;\"\u003e\n    \u003cimg src=\"https://assets.ccbp.in/frontend/content/react-js/authentication-functionality-output-v2.gif\" alt=\"authentication-functionality-desktop-output\" style=\"max-width:90%;box-shadow:0 2.8px 2.2px rgba(0, 0, 0, 0.12)\"\u003e\n\u003c/div\u003e\n\u003cbr/\u003e\n\n### Design Files\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to view\u003c/summary\u003e\n\n- [Login Route](https://assets.ccbp.in/frontend/content/react-js/authentication-functionality-lg-login-output.png)\n- [Home Route](https://assets.ccbp.in/frontend/content/react-js/authentication-functionality-lg-home-output-v2.png)\n- [About Route](https://assets.ccbp.in/frontend/content/react-js/authentication-functionality-lg-about-output-v2.png)\n- [Not Found Route](https://assets.ccbp.in/frontend/content/react-js/authentication-functionality-lg-not-found-output.png)\n\n\u003c/details\u003e\n\n### Set Up Instructions\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to view\u003c/summary\u003e\n\n- Download dependencies by running `npm install`\n- Start up the app using `npm start`\n\u003c/details\u003e\n\n### Completion Instructions\n\n\u003cdetails\u003e\n\u003csummary\u003eFunctionality to be added\u003c/summary\u003e\n\u003cbr/\u003e\n\nThe app must have the following functionalities\n\n- When an unauthenticated user tries to access the Home Route or About Route, then the page should be navigated to the Login Route\n- When an authenticated user tries to access the Home Route, or About Route, then the page should be navigated to the respective route\n- When an authenticated user tries to access the Login Route, then the page should be redirected to Home Route\n- When the **Logout** button is clicked then the page should be navigated to the Login Route\n- When a random path is provided in the URL then the page should be navigated to the Not Found Route\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\n\u003csummary\u003eAPI Requests \u0026 Responses\u003c/summary\u003e\n\u003cbr/\u003e\n\n**loginApiUrl**\n\n#### API: `https://apis.ccbp.in/login`\n\n#### Method: `POST`\n\n#### Description:\n\nReturns a response based on the credentials provided\n\n#### Sample Success Response\n\n```json\n{\n  \"jwt_token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6InJhaHVsIiwicm9sZSI6IlBSSU1FX1VTRVIiLCJpYXQiOjE2MTk2Mjg2MTN9.nZDlFsnSWArLKKeF0QbmdVfLgzUbx1BGJsqa2kc_21Y\"\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eComponents Structure\u003c/summary\u003e\n\n\u003cbr/\u003e\n\u003cdiv style=\"text-align: center;\"\u003e\n    \u003cimg src=\"https://assets.ccbp.in/frontend/content/react-js/authentication-functionality-login-home-component-structure.png\" alt=\"authentication functionality login and home components structure\" style=\"max-width:100%;box-shadow:0 2.8px 2.2px rgba(0, 0, 0, 0.12)\"\u003e\n\u003c/div\u003e\n\u003cbr/\u003e\n\u003cdiv style=\"text-align: center;\"\u003e\n    \u003cimg src=\"https://assets.ccbp.in/frontend/content/react-js/authentication-functionality-about-not-found-component-structure.png\" alt=\"authentication functionality about and not found components structure\" style=\"max-width:100%;box-shadow:0 2.8px 2.2px rgba(0, 0, 0, 0.12)\"\u003e\n\u003c/div\u003e\n\u003cbr/\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eImplementation Files\u003c/summary\u003e\n\u003cbr/\u003e\n\nUse these files to complete the implementation:\n\n- `src/App.js`\n- `src/components/Login/index.js`\n- `src/components/Login/index.css`\n- `src/components/Header/index.js`\n- `src/components/Header/index.css`\n- `src/components/Home/index.js`\n- `src/components/Home/index.css`\n- `src/components/About/index.js`\n- `src/components/About/index.css`\n- `src/components/LogoutButton/index.js`\n- `src/components/LogoutButton/index.css`\n- `src/components/NotFound/index.js`\n- `src/components/NotFound/index.css`\n- `src/components/ProtectedRoute/index.js`\n\u003c/details\u003e\n\n### Important Note\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to view\u003c/summary\u003e\n\n\u003cbr/\u003e\n\n**The following instructions are required for the tests to pass**\n\n- `Home` route should consist of `/` in the URL path\n- `Login` route should consist of `/login` in the URL path\n- `About` route should consist of `/about` in the URL path\n- No need to use the `BrowserRouter` in `App.js` as we have already included in `index.js`\n- As this project is mainly designed for Authentication Functionality and does not contain any input fields, use the below sample user credentials to login\n\n  - User credentials\n\n    ```text\n    username: rahul\n    password: rahul@2021\n    ```\n\n\u003c/details\u003e\n\n### Resources\n\n\u003cdetails\u003e\n\u003csummary\u003eFont-families\u003c/summary\u003e\n\n- Roboto\n\n\u003c/details\u003e\n\n\u003e ### _Things to Keep in Mind_\n\u003e\n\u003e - All components you implement should go in the `src/components` directory.\n\u003e - Don't change the component folder names as those are the files being imported into the tests.\n\u003e - **Do not remove the pre-filled code**\n\u003e - Want to quickly review some of the concepts you’ve been learning? Take a look at the Cheat Sheets.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnitish2773%2Freactauthenticationfunctionality","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnitish2773%2Freactauthenticationfunctionality","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnitish2773%2Freactauthenticationfunctionality/lists"}